]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Fix test FAIL with -O2
authorJan Kratochvil <jan.kratochvil@redhat.com>
Thu, 5 Dec 2013 15:16:14 +0000 (16:16 +0100)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Thu, 5 Dec 2013 15:16:14 +0000 (16:16 +0100)
Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
tests/ChangeLog
tests/backtrace-child.c

index 89925682515849941b704b67cb92cd50da1bc527..9e4cd9afc78b0f56a0b85a5a9333c78cac977d04 100644 (file)
@@ -1,3 +1,8 @@
+2013-12-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       Fix test FAIL with -O2.
+       * backtrace-child.c (sigusr2): Add NOINLINE_NOCLONE and final asm stub.
+
 2013-12-05  Mark Wielaard  <mjw@redhat.com>
 
        * backtrace-data.c (main): If unsupported also print to stderr.
index 2bc0eded28d98d5da6d0717ad01fbe20951c9f97..0db125899893beb22d98723853aa070a31b48cbb 100644 (file)
@@ -93,7 +93,7 @@ static int ptraceme, gencore;
 
 /* Execution will arrive here from jmp by an artificial ptrace-spawn signal.  */
 
-static void
+static NOINLINE_NOCLONE void
 sigusr2 (int signo)
 {
   assert (signo == SIGUSR2);
@@ -105,6 +105,8 @@ sigusr2 (int signo)
     }
   /* Here we dump the core for --gencore.  */
   raise (SIGABRT);
+  /* Avoid tail call optimization for the raise call.  */
+  asm volatile ("");
 }
 
 static NOINLINE_NOCLONE void