17f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen//===-- main.c --------------------------------------------------*- C++ -*-===// 27f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen// 37f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen// The LLVM Compiler Infrastructure 47f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen// 57f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen// This file is distributed under the University of Illinois Open Source 67f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen// License. See LICENSE.TXT for details. 77f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen// 87f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen//===----------------------------------------------------------------------===// 97f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen#include <stdio.h> 107f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen 117f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chenint main(int argc, const char* argv[]) 127f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen{ 137f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen int *null_ptr = 0; 147f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen printf("Hello, segfault!\n"); 157f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen printf("Now crash %d\n", *null_ptr); // Crash here. 167f9985a68d49e284145cc1daeea3d2e9d48eb138Johnny Chen} 17