[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Patches] [patch] Fix for debug/tst-backtrace5 failure
- To: "Joseph S. Myers" <joseph@xxxxxxxxxxxxxxxx>
- Subject: [Patches] [patch] Fix for debug/tst-backtrace5 failure
- From: Tom de Vries <Tom_deVries@xxxxxxxxxx>
- Date: Tue, 23 Oct 2012 08:27:38 +0200
Joseph,
I'm reposting the tst-backtrace5.c part of
http://www.eglibc.org/archives/patches/msg01077.html.
The patch fixes a problem with tst-backtrace5.c where the test fails because it
doesn't take VDSO into account.
I've reproduced the problem on an i686-pc-linux-gnu host with
i686-unknown-linux-gnu target:
...
Obtained backtrace with 7 functions
Function 0: /build/debug/tst-backtrace5(handle_signal+0x1a) [0x804930a]
Function 1: linux-gate.so.1(__kernel_sigreturn+0) [0x55577400]
Function 2: linux-gate.so.1(__kernel_vsyscall+0x10) [0x55577430]
Function 3: /build/libc.so.6(__read+0x23) [0x55659c43]
Function 4: /build/debug/tst-backtrace5(fn+0xb8) [0x80496f8]
Function 5: /build/debug/tst-backtrace5(fn+0x1e) [0x804965e]
Function 6: /build/debug/tst-backtrace5(fn+0x1e) [0x804965e]
Failure on line 87
...
I've retested the patch, and checked that it fixes the tst-backtrace5.c failure.
OK for trunk?
Thanks,
- Tom
2012-02-20 Paul Pluzhnikov <ppluzhnikov@xxxxxxxxxx>
* debug/tst-backtrace5.c (handle_signal): Adjust for VDSO.
Index: debug/tst-backtrace5.c
===================================================================
--- debug/tst-backtrace5.c (revision 17223)
+++ debug/tst-backtrace5.c (working copy)
@@ -82,12 +82,17 @@
return;
}
/* Do not check name for signal trampoline. */
- if (strstr (symbols[2], "read") == NULL)
+ i = 2;
+ if (strstr (symbols[i++], "read") == NULL)
{
- FAIL ();
- return;
+ /* Perhaps symbols[2] is __kernel_vsyscall? */
+ if (strstr (symbols[i++], "read") == NULL)
+ {
+ FAIL ();
+ return;
+ }
}
- for (i = 3; i < n - 1; i++)
+ for (; i < n - 1; i++)
if (strstr (symbols[i], "fn") == NULL)
{
FAIL ();
_______________________________________________
Patches mailing list
Patches@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/patches