summaryrefslogtreecommitdiff
blob: 213b06b7a1fbe57f3b798b119cd635f95c74c4e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
https://bugs.gentoo.org/497566

From 435808a681cc375f0907f2066c4cc062173a6c7e Mon Sep 17 00:00:00 2001
From: Jan Kratochvil <jan.kratochvil@redhat.com>
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 <jan.kratochvil@redhat.com>
---
 tests/ChangeLog         | 6 ++++++
 tests/backtrace-child.c | 8 +++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

2014-01-18  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Fix false FAILs on testsuite with ulimit -c unlimited.
	* backtrace-child.c (sigusr2): Call pthread_exit.
	(main): Return, do not call abort.

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;
 }
-- 
1.8.5.3