]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Bug 402480 Do not use %esp in clobber list.
authorMark Wielaard <mark@klomp.org>
Fri, 11 Jan 2019 19:00:17 +0000 (20:00 +0100)
committerMark Wielaard <mark@klomp.org>
Fri, 11 Jan 2019 19:00:21 +0000 (20:00 +0100)
This is the same fix as for amd64-linux, but now for x86-linux.

none/tests/x86-linux/bug345887.c

index f2e8a8ddec5cfdd97b3e5b0af1946be16e27956e..ef21d4e32410cc91014101743a60da5155771ce8 100644 (file)
@@ -12,12 +12,14 @@ static void inner(void)
       "movl $0x105, %%esi\n"
       "movl $0x106, %%edi\n"
       // not %ebp as mdb is then not able to reconstruct stack trace
+      // clobbering %esp is really bad, but that is kind of the point
+      // we don't add it to the clobber list since gcc9 warns about that
       "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");
+      : "memory", "%eax", "%ebx", "%ecx", "%edx", "%esi", "%edi");
 }
 
 __attribute__((noinline))