summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJan Kratochvil <[email protected]>2013-12-05 16:16:14 +0100
committerJan Kratochvil <[email protected]>2013-12-05 16:16:14 +0100
commitf88863fbb3a7380ad8c7ebcdf6dceb023f3ccf75 (patch)
treeac3de1344cfffc1a9da1bda920480e7ec6800109 /tests
parent813aae0e94c2e694e1cad25d4e268dfe60397196 (diff)
Fix test FAIL with -O2
Signed-off-by: Jan Kratochvil <[email protected]>
Diffstat (limited to 'tests')
-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 <[email protected]>
+
+ Fix test FAIL with -O2.
+ * backtrace-child.c (sigusr2): Add NOINLINE_NOCLONE and final asm stub.
+
2013-12-05 Mark Wielaard <[email protected]>
* 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