Add missing zstd.h to coregrind Makefile.am noinst_HEADERS
[valgrind.git] / memcheck / tests / linux / dlclose_leak_so.c
blobfa3205e21ecdd0b6749a0d5de23fe50589d351b5
1 /* dlclose_leak_so.c */
3 #include <stdlib.h>
5 /** Makes a jump based on an uninitialized variable in order to make sure
6 * errors reported while the dlopen'ed object is loaded work. */
7 int jmp_on_uninit(void) {
8 int uninit[27];
9 __asm__ __volatile("":::"cc","memory");
10 if(uninit[13]) {
11 return 1;
12 } else {
13 return 0;
17 /** Leak 1 byte of memory. This is to test the stack check reported after the
18 * object has been dlclose'd. */
19 char* alloc_1_byte(void) {
20 return (char*)malloc(1);