none/tests/fdleak_cmsg_supp.supp: Add suppressions for older glibc
[valgrind.git] / none / tests / x86-linux / bug345887.c
blobef21d4e32410cc91014101743a60da5155771ce8
1 /* This test used to cause an assertion in the address space manager */
3 __attribute__((noinline))
4 static void inner(void)
6 /* Set other registers to apriori known values. */
7 __asm__ __volatile__(
8 "movl $0x101, %%eax\n"
9 "movl $0x102, %%ebx\n"
10 "movl $0x103, %%ecx\n"
11 "movl $0x104, %%edx\n"
12 "movl $0x105, %%esi\n"
13 "movl $0x106, %%edi\n"
14 // not %ebp as mdb is then not able to reconstruct stack trace
15 // clobbering %esp is really bad, but that is kind of the point
16 // we don't add it to the clobber list since gcc9 warns about that
17 "movl $0x108, %%esp\n"
18 "movl $0x1234, (%%eax)\n" // should cause SEGV here
19 "ud2" // should never get here
20 : // no output registers
21 : // no input registers
22 : "memory", "%eax", "%ebx", "%ecx", "%edx", "%esi", "%edi");
25 __attribute__((noinline))
26 static void outer(void)
28 inner();
31 int main(int argc, const char *argv[])
33 outer();
34 return 0;