From 435808a681cc375f0907f2066c4cc062173a6c7e Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Sat, 18 Jan 2014 21:56:13 +0100 Subject: [PATCH] Fix false FAILs on testsuite with ulimit -c unlimited. Signed-off-by: Jan Kratochvil --- tests/ChangeLog | 6 ++++++ tests/backtrace-child.c | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/ChangeLog b/tests/ChangeLog index 1b84f3a..df5c509 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,9 @@ +2014-01-18 Jan Kratochvil + + Fix false FAILs on testsuite with ulimit -c unlimited. + * backtrace-child.c (sigusr2): Call pthread_exit. + (main): Return, do not call abort. + 2014-01-15 Jan Kratochvil Fix corruption of non-C++ symbols by the demangler. diff --git a/tests/backtrace-child.c b/tests/backtrace-child.c index 0db1258..512aa23 100644 --- a/tests/backtrace-child.c +++ b/tests/backtrace-child.c @@ -100,7 +100,10 @@ sigusr2 (int signo) if (! gencore) { raise (SIGUSR1); - /* It should not be reached. */ + /* Do not return as stack may be invalid due to ptrace-patched PC to the + jmp function. */ + pthread_exit (NULL); + /* Not reached. */ abort (); } /* Here we dump the core for --gencore. */ @@ -218,6 +221,5 @@ main (int argc UNUSED, char **argv) pthread_join (thread, NULL); else raise (SIGUSR2); - /* Not reached. */ - abort (); + return 0; } -- 2.7.4