Don't call vg_assert inside sync_signalhandler_from_kernel
[valgrind.git] / memcheck / tests / nanoleak2.c
blobf73840f12ad2946e7205fa3c6c07aa4703d933b9
2 // Bruce Lowekamp <lowekamp@sipeerior.com> reported that in a program with a
3 // reachable leak, if you do:
4 //
5 // valgrind --leak-check=yes --gen-suppressions=yes --show-reachable=no -q
6 //
7 // it gives the y/n/c suppression prompt for errors that aren't shown. This
8 // test checks that is fixed.
9 //
10 // [The .vgtest file was later changed to use --leak-check=all so that if a
11 // suppression is (erroneously?) generated, the test doesn't wait for the user
12 // to press 'y', because that pauses the entire regtest system.]
14 #include <stdlib.h>
16 int* a;
18 int main ( void )
20 a = malloc(1000); // Becomes a reachable leak.
21 a[0] = 0;
22 return a[0];