Bug 466762 - Add redirs for C23 free_sized() and free_aligned_sized()
[valgrind.git] / memcheck / tests / wrap1.c
blob3746e826316575e7c762e5d681b1de991360cfea
2 #include <stdio.h>
3 #include "valgrind.h"
5 /* The simplest possible wrapping test: just call a wrapped function
6 and check we run the wrapper instead. */
8 /* The "original" function */
9 __attribute__((noinline))
10 void actual ( void )
12 printf("in actual\n");
15 /* The wrapper. Since this executable won't have a soname, we have to
16 use "NONE", since V treats any executable/.so which lacks a soname
17 as if its soname was "NONE". */
18 void I_WRAP_SONAME_FNNAME_ZU(NONE,actual) ( void )
20 OrigFn fn;
21 VALGRIND_GET_ORIG_FN(fn);
22 printf("wrapper-pre\n");
23 CALL_FN_v_v(fn);
24 printf("wrapper-post\n");
27 /* --------------- */
29 int main ( void )
31 printf("starting\n");
32 actual();
33 return 0;