2 #include "tests/malloc.h"
9 void maybe_fault ( int delta
)
11 char* x
= memalign16(32);
15 : /*out*/ : /*in*/ "r"(x
+delta
) : /*trash*/"xmm7" );
19 void handler ( int signo
)
21 #if defined(__FreeBSD__)
22 assert(signo
== SIGBUS
);
24 assert(signo
== SIGSEGV
);
26 fprintf(stderr
, "three\n");
32 #if defined(__FreeBSD__)
33 signal(SIGBUS
, handler
);
35 signal(SIGSEGV
, handler
);
37 fprintf(stderr
, "you should see: \"one\\ntwo\\nthree\\n\"\n");
38 fprintf(stderr
, "one\n");
40 fprintf(stderr
, "two\n");
42 fprintf(stderr
, "test failed! you shouldn't see this\n");