blob: f2e8a8ddec5cfdd97b3e5b0af1946be16e27956e [file] [log] [blame]
/* This test used to cause an assertion in the address space manager */
static void inner(void)
/* Set other registers to apriori known values. */
__asm__ __volatile__(
"movl $0x101, %%eax\n"
"movl $0x102, %%ebx\n"
"movl $0x103, %%ecx\n"
"movl $0x104, %%edx\n"
"movl $0x105, %%esi\n"
"movl $0x106, %%edi\n"
// not %ebp as mdb is then not able to reconstruct stack trace
"movl $0x108, %%esp\n"
"movl $0x1234, (%%eax)\n" // should cause SEGV here
"ud2" // should never get here
: // no output registers
: // no input registers
: "memory", "%eax", "%ebx", "%ecx", "%edx", "%esi", "%edi", "%esp");
static void outer(void)
int main(int argc, const char *argv[])
return 0;