From: Jan Kratochvil Date: Thu, 5 Dec 2013 15:16:14 +0000 (+0100) Subject: Fix test FAIL with -O2 X-Git-Tag: elfutils-0.158~47 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f88863fbb3a7380ad8c7ebcdf6dceb023f3ccf75;p=thirdparty%2Felfutils.git Fix test FAIL with -O2 Signed-off-by: Jan Kratochvil --- diff --git a/tests/ChangeLog b/tests/ChangeLog index 899256825..9e4cd9afc 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2013-12-05 Jan Kratochvil + + Fix test FAIL with -O2. + * backtrace-child.c (sigusr2): Add NOINLINE_NOCLONE and final asm stub. + 2013-12-05 Mark Wielaard * backtrace-data.c (main): If unsupported also print to stderr. diff --git a/tests/backtrace-child.c b/tests/backtrace-child.c index 2bc0eded2..0db125899 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