Johnny Chen | 1ee61a7 | 2011-04-18 21:08:05 +0000 | [diff] [blame] | 1 | //===-- main.c --------------------------------------------------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | #include <stdio.h> |
| 10 | |
| 11 | int main(int argc, const char* argv[]) |
| 12 | { |
| 13 | int *null_ptr = 0; |
| 14 | printf("Hello, segfault!\n"); |
| 15 | printf("Now crash %d\n", *null_ptr); // Crash here. |
| 16 | } |