summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/ChangeLog5
-rw-r--r--tests/backtrace-child.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 89925682..9e4cd9af 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -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.
diff --git a/tests/backtrace-child.c b/tests/backtrace-child.c
index 2bc0eded..0db12589 100644
--- a/tests/backtrace-child.c
+++ b/tests/backtrace-child.c
@@ -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