]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
backport the "(below main)" backtrace fix to reduce regression
authorDirk Mueller <daywalker@users.sourceforge.net>
Wed, 22 Feb 2006 19:47:10 +0000 (19:47 +0000)
committerDirk Mueller <daywalker@users.sourceforge.net>
Wed, 22 Feb 2006 19:47:10 +0000 (19:47 +0000)
failures on PPC32

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_1_BRANCH@5692

16 files changed:
coregrind/m_demangle/demangle.c
memcheck/tests/badjump.stderr.exp
memcheck/tests/badjump2.stderr.exp
memcheck/tests/buflen_check.stderr.exp2
memcheck/tests/execve.stderr.exp2
memcheck/tests/execve2.stderr.exp2
memcheck/tests/fwrite.stderr.exp
memcheck/tests/x86/scalar_exit_group.stderr.exp
memcheck/tests/xml1.stderr.exp
none/tests/fdleak_creat.stderr.exp
none/tests/fdleak_dup.stderr.exp
none/tests/fdleak_dup2.stderr.exp
none/tests/fdleak_fcntl.stderr.exp
none/tests/fdleak_open.stderr.exp
none/tests/fdleak_pipe.stderr.exp
none/tests/fdleak_socketpair.stderr.exp

index 82f8e1803b08e55cae216ebe3b1d1b8a0ff0a79c..686a9282e38fbdccf802f2ec82676f07d00a5e55 100644 (file)
@@ -58,6 +58,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);
+
    VGP_POPCC(VgpDemangle);
 }
 
index 74c7dde7de67ca25dd71f0e3526994b3253dbbe5..6e723e558fe561d3b3efc98a320f37834882945d 100644 (file)
@@ -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.
index 741ad1e96059d87011f8ba929da6bb3a39c0ba3f..ba259959885b35b4298583aa3e6656b06b0da315 100644 (file)
@@ -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
index cea97f6b4510c9eb9722c53f5d4e90de81033e81..a8f33873cef065f7b874ba6853c6abc4e00d1185 100644 (file)
@@ -1,11 +1,11 @@
 Syscall param socketcall.getsockname(name) points to unaddressable byte(s)
    at 0x........: getsockname (in /...libc...)
-   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
 
 Syscall param socketcall.getsockname(namelen_in) points to unaddressable byte(s)
    at 0x........: getsockname (in /...libc...)
-   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
 getsockname(1) failed
 getsockname(2) failed
index e059ba89d9f55355222235a23201fa50bad67551..0fa0337ed03d2f356b6b9b520af524ee0cd85930 100644 (file)
@@ -1,14 +1,14 @@
 Syscall param execve(filename) points to unaddressable byte(s)
    at 0x........: execve (in /...libc...)
-   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
 
 Syscall param execve(argv[i]) points to unaddressable byte(s)
    at 0x........: execve (in /...libc...)
-   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
 
 Syscall param execve(envp[i]) points to unaddressable byte(s)
    at 0x........: execve (in /...libc...)
-   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
index 0ebfc109372753a6061e2d7e9db8e8b6572bd9c4..8168de12957b86476334e9b579b262c36599757b 100644 (file)
@@ -1,4 +1,4 @@
 Syscall param execve(filename) points to unaddressable byte(s)
    at 0x........: execve (in /...libc...)
-   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
index cb9d6873180ef94e34b00d8cd12a8425ee80feed..3dc924feb19b8add1d9ade3d8c76126a66c1bb81 100644 (file)
@@ -1,6 +1,6 @@
 Syscall param write(buf) points to uninitialised byte(s)
    at 0x........: write (in /...libc...)
-   by 0x........: __libc_start_main (in /...libc...)
+   by 0x........: (below main) (in /...libc...)
  Address 0x........ is 0 bytes inside a block of size 10 alloc'd
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: main (fwrite.c:7)
index cbef1234ff600b0da2fa07b713d9153bd99125a8..7347116123d02b0c4e59051b3c0d17815b15e18b 100644 (file)
@@ -3,4 +3,4 @@
 -----------------------------------------------------
 Syscall param exit_group(exit_code) contains uninitialised byte(s)
    at 0x........: syscall (in /...libc...)
-   by 0x........: __libc_start_main (in /...libc...)
+   by 0x........: (below main) (in /...libc...)
index 7b532335db947e711bfacb26a9c097827dd54044..0657a38a87fd6dc2620cacb3044e31c7903fcf2c 100644 (file)
     <frame>
       <ip>0x........</ip>
       <obj>...</obj>
-      <fn>__libc_start_main</fn>
+      <fn>(below main)</fn>
     </frame>
   </stack>
 </error>
index 766a979f19c55ba7ee0ef5c45ac2c230dd0e77c8..b35d8ffc9fc83d2add5e7d234d024862b1f69465 100644 (file)
@@ -4,7 +4,7 @@ FILE DESCRIPTORS: 4 open at exit.
 Open file descriptor .: /tmp/file
 
    at 0x........: creat (in /...libc...)
-   by 0x........: __libc_start_main (in /...libc...)
+   by 0x........: (below main) (in /...libc...)
 
 Open file descriptor .: .
    <inherited from parent>
index d040fdd58c0ea56fc836d0f7f04a7351551abf41..4e9b9fbc9613a8b4389de4cc15734128d4df944f 100644 (file)
@@ -3,11 +3,11 @@
 FILE DESCRIPTORS: 5 open at exit.
 Open file descriptor .: /dev/null
    at 0x........: dup (in /...libc...)
-   by 0x........: __libc_start_main (in /...libc...)
+   by 0x........: (below main) (in /...libc...)
 
 Open file descriptor .: /dev/null
    at 0x........: open (in /...libc...)
-   by 0x........: __libc_start_main (in /...libc...)
+   by 0x........: (below main) (in /...libc...)
 
 Open file descriptor .: .
    <inherited from parent>
index 75dad558d441d6a7fb77fa06a6c033d3b137e9b0..bb0dafcd054152faa73289b4dd8c5ea47a9282bb 100644 (file)
@@ -3,15 +3,15 @@
 FILE DESCRIPTORS: 6 open at exit.
 Open file descriptor .: /dev/null
    at 0x........: dup2 (in /...libc...)
-   by 0x........: __libc_start_main (in /...libc...)
+   by 0x........: (below main) (in /...libc...)
 
 Open file descriptor .: /dev/null
    at 0x........: dup2 (in /...libc...)
-   by 0x........: __libc_start_main (in /...libc...)
+   by 0x........: (below main) (in /...libc...)
 
 Open file descriptor .: /dev/null
    at 0x........: open (in /...libc...)
-   by 0x........: __libc_start_main (in /...libc...)
+   by 0x........: (below main) (in /...libc...)
 
 Open file descriptor .: .
    <inherited from parent>
index a4719a4b19f307dadfa0d23b85433a0aeafd7d0e..f5b799bfc89fa0627ed18f50a4faaf98e384d70f 100644 (file)
@@ -7,7 +7,7 @@ Open file descriptor .: /dev/null
 
 Open file descriptor .: /dev/null
    at 0x........: open (in /...libc...)
-   by 0x........: __libc_start_main (in /...libc...)
+   by 0x........: (below main) (in /...libc...)
 
 Open file descriptor .: .
    <inherited from parent>
index 1d9c2b266cbf89789612af3b3a6809a619134d9b..85b3504b31fc1466ec5ee1763bcec520c00d80d3 100644 (file)
@@ -3,7 +3,7 @@
 FILE DESCRIPTORS: 4 open at exit.
 Open file descriptor .: /dev/null
    at 0x........: open (in /...libc...)
-   by 0x........: __libc_start_main (in /...libc...)
+   by 0x........: (below main) (in /...libc...)
 
 Open file descriptor .: .
    <inherited from parent>
index dc92a373583169b554a5bc81688b22d7c316259e..2457340c861efb29798c7e2b8eaaad125ffeb73b 100644 (file)
@@ -3,11 +3,11 @@
 FILE DESCRIPTORS: 5 open at exit.
 Open file descriptor .:
    at 0x........: pipe (in /...libc...)
-   by 0x........: __libc_start_main (in /...libc...)
+   by 0x........: (below main) (in /...libc...)
 
 Open file descriptor .:
    at 0x........: pipe (in /...libc...)
-   by 0x........: __libc_start_main (in /...libc...)
+   by 0x........: (below main) (in /...libc...)
 
 Open file descriptor .: .
    <inherited from parent>
index 2075bade17f8517d4e53a46851d7e148bfe2a882..0b838b9dc2007f00c01598d544a8d101c2c3cd3c 100644 (file)
@@ -3,11 +3,11 @@
 FILE DESCRIPTORS: 5 open at exit.
 Open AF_UNIX socket .: <unknown>
    at 0x........: socketpair (in /...libc...)
-   by 0x........: main (fdleak_socketpair.c:15)
+   by 0x........: (below main) (in /...libc...)
 
 Open AF_UNIX socket .: <unknown>
    at 0x........: socketpair (in /...libc...)
-   by 0x........: main (fdleak_socketpair.c:15)
+   by 0x........: (below main) (in /...libc...)
 
 Open file descriptor .: .
    <inherited from parent>