Debian Codegraph @

seg-fault.c

raw symbols SCIP
1 /*
2 * Copyright (C) 2021, Benjamin Drung <[email protected]>
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16
17 #include <stdio.h>
18 #include <stdlib.h>
19
20 #include "noinline.h"cxx . . $ `<file>/noinline.h`/
21
22 noinlinecxx . . $ `noinline.h:18:11`! int *segmentation_faultcxx . . $ segmentation_fault(5484d3eabe7b63f7).() {
23 int *null_pointer = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
24 *null_pointer = 42;
25 return null_pointer;
26 }
27
28 int maincxx . . $ main(afcd3168fc1188a4).(int argc, char *argv[]) {
29 if(argc != 1) {
30 fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Usage: %s\n", argv[0]);
31 return EXIT_FAILUREcxx . . $ `<external>/10696550936717951914/stdlib.h:92:9`!;
32 }
33
34 int *fourty_two = segmentation_faultcxx . . $ segmentation_fault(5484d3eabe7b63f7).();
35
36 return *fourty_two - 42;
37 }