From 8a00ed81747e2d92f6504941e49160cbea22335a Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Wed, 18 Jan 2006 04:20:04 +0000 Subject: [PATCH] To reduce the endless nuisance of multiple different names for "the frame below main()" screwing up the testsuite, change all known incarnations of said into a single name, "(below main)". git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5547 --- coregrind/m_demangle/demangle.c | 7 +++++++ memcheck/tests/badjump.stderr.exp | 4 ++-- memcheck/tests/badjump2.stderr.exp | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/coregrind/m_demangle/demangle.c b/coregrind/m_demangle/demangle.c index 3b4e4096d..a895368a2 100644 --- a/coregrind/m_demangle/demangle.c +++ b/coregrind/m_demangle/demangle.c @@ -90,6 +90,13 @@ void VG_(demangle) ( Char* orig, Char* result, Int result_size ) // does leak. But, we can't do much about it, and it's not a disaster, // so we just let it slide without aborting or telling the user. + // Finally, to reduce the endless nuisance of multiple different names + // for "the frame below main()" screwing up the testsuite, change all + // known incarnations of said into a single name, "(below main)". + if (0==VG_(strcmp)("__libc_start_main", result) + || 0==VG_(strcmp)("generic_start_main", result)) + VG_(strncpy_safely)(result, "(below main)", 13); + # undef N_ZBUF } diff --git a/memcheck/tests/badjump.stderr.exp b/memcheck/tests/badjump.stderr.exp index 74c7dde7d..6e723e558 100644 --- a/memcheck/tests/badjump.stderr.exp +++ b/memcheck/tests/badjump.stderr.exp @@ -1,13 +1,13 @@ Jump to the invalid address stated on the next line at 0x........: ??? - by 0x........: __libc_start_main (in /...libc...) + by 0x........: (below main) (in /...libc...) Address 0x........ is not stack'd, malloc'd or (recently) free'd Process terminating with default action of signal 11 (SIGSEGV) Access not within mapped region at address 0x........ at 0x........: ??? - by 0x........: __libc_start_main (in /...libc...) + by 0x........: (below main) (in /...libc...) ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) malloc/free: in use at exit: 0 bytes in 0 blocks. diff --git a/memcheck/tests/badjump2.stderr.exp b/memcheck/tests/badjump2.stderr.exp index 741ad1e96..ba2599598 100644 --- a/memcheck/tests/badjump2.stderr.exp +++ b/memcheck/tests/badjump2.stderr.exp @@ -1,5 +1,5 @@ Jump to the invalid address stated on the next line at 0x........: ??? - by 0x........: __libc_start_main (in /...libc...) + by 0x........: (below main) (in /...libc...) Address 0x........ is not stack'd, malloc'd or (recently) free'd Signal caught, as expected