1 //===-- main.c --------------------------------------------------*- C++ -*-===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 #include <stdio.h> 9 10 const char *hello_world = "Hello, segfault!"; 11 12 int main(int argc, const char* argv[]) 13 { 14 int *null_ptr = 0; 15 printf("%s\n", hello_world); 16 printf("Now crash %d\n", *null_ptr); // Crash here. 17 } 18