summaryrefslogtreecommitdiffstats
path: root/packages/Python/lldbsuite/test/functionalities/inferior-changed/main2.c
blob: 9173e8c30b593ecdb5be6e2872262a8d01d1a08c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//===-- main2.c -------------------------------------------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include <stdio.h>
#include <stdlib.h>

int main(int argc, const char* argv[])
{
    int *int_ptr = (int *)malloc(sizeof(int));
    *int_ptr = 7;
    printf("Hello, world!\n");
    printf("Now not crash %d\n", *int_ptr); // Not crash here.
}
OpenPOWER on IntegriCloud