Filter out everything after "(below main)" in a line. This will help with

Darwin, for which such entries can occur within the executable, rather than
within libc.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9142
This commit is contained in:
Nicholas Nethercote 2009-02-12 00:51:50 +00:00
parent f0f8b48fcf
commit f3240d6950
35 changed files with 757 additions and 755 deletions

View File

@ -28,7 +28,7 @@ The object at address 0x........ is not a mutex.
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
at 0x........: nearly_main (tc09_bad_unlock.c:45)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
---------------------
Mutex not locked by calling thread: mutex 0x........, recursion count 0, owner 1.
@ -60,6 +60,6 @@ The object at address 0x........ is not a mutex.
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
at 0x........: nearly_main (tc09_bad_unlock.c:45)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
ERROR SUMMARY: 8 errors from 8 contexts (suppressed: 0 from 0)

View File

@ -128,6 +128,6 @@ Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
by 0x........: (within ld-?.?.so)
by 0x........: exit (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
ERROR SUMMARY: 14 errors from 14 contexts (suppressed: 0 from 0)

View File

@ -163,7 +163,7 @@ Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
by 0x........: (within ld-?.?.so)
by 0x........: exit (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
[1/1] mutex_destroy invalid mutex 0x........
[1/1] mutex_unlock recursive mutex 0x........ rc 1
[1/1] pre_mutex_lock recursive mutex 0x........ rc 0 owner 1

View File

@ -4,6 +4,6 @@ Thread #x is the program's root thread
Thread #x: Exiting thread still holds 2 locks
at 0x........: _Exit (in /...libc...)
by 0x........: exit (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

View File

@ -93,6 +93,6 @@ Thread #x's call to pthread_mutex_unlock failed
Thread #x: Exiting thread still holds 1 lock
at 0x........: _Exit (in /...libc...)
by 0x........: exit (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
ERROR SUMMARY: 11 errors from 11 contexts (suppressed: 0 from 0)

View File

@ -91,6 +91,6 @@ Thread #x's call to pthread_mutex_unlock failed
Thread #x: Exiting thread still holds 1 lock
at 0x........: _Exit (in /...libc...)
by 0x........: exit (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
ERROR SUMMARY: 11 errors from 11 contexts (suppressed: 0 from 0)

View File

@ -154,6 +154,6 @@ FIXME: can't figure out how to verify wrap of sem_post
Thread #x: Exiting thread still holds 1 lock
at 0x........: _Exit (in /...libc...)
by 0x........: exit (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
ERROR SUMMARY: 20 errors from 20 contexts (suppressed: 0 from 0)

View File

@ -159,6 +159,6 @@ FIXME: can't figure out how to verify wrap of sem_post
Thread #x: Exiting thread still holds 1 lock
at 0x........: _Exit (in /...libc...)
by 0x........: exit (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
ERROR SUMMARY: 21 errors from 21 contexts (suppressed: 0 from 0)

View File

@ -160,6 +160,6 @@ FIXME: can't figure out how to verify wrap of sem_post
Thread #x: Exiting thread still holds 1 lock
at 0x........: _Exit (in /...libc...)
by 0x........: exit (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
ERROR SUMMARY: 21 errors from 21 contexts (suppressed: 0 from 0)

View File

@ -23,6 +23,6 @@ Thread #x is the program's root thread
Thread #x: Exiting thread still holds 1 lock
at 0x........: kill (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)

View File

@ -46,7 +46,7 @@ Number of snapshots: 11
8 1,664 1,664 1,600 64 0
9 1,872 1,872 1,800 72 0
96.15% (1,800B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
->96.15% (1,800B) 0x........: (below main) (in /...libc...)
->96.15% (1,800B) 0x........: (below main)
--------------------------------------------------------------------------------
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)

View File

@ -1,13 +1,13 @@
Jump to the invalid address stated on the next line
at 0x........: ???
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
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........: (below main) (in /...libc...)
by 0x........: (below main)
If you believe this happened as a result of a stack overflow in your
program's main thread (unlikely but possible), you can try to increase
the size of the main thread stack using the --main-stacksize= flag.

View File

@ -1,5 +1,5 @@
Jump to the invalid address stated on the next line
at 0x........: ???
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Signal caught, as expected

View File

@ -1,11 +1,11 @@
Syscall param socketcall.getsockname(name) points to unaddressable byte(s)
at 0x........: getsockname (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
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........: (below main) (in /...libc...)
by 0x........: (below main)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
getsockname(1) failed
getsockname(2) failed

View File

@ -1,14 +1,14 @@
Syscall param execve(filename) points to unaddressable byte(s)
at 0x........: execve (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
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........: (below main) (in /...libc...)
by 0x........: (below main)
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........: (below main) (in /...libc...)
by 0x........: (below main)
Address 0x........ is not stack'd, malloc'd or (recently) free'd

View File

@ -1,4 +1,4 @@
Syscall param execve(filename) points to unaddressable byte(s)
at 0x........: execve (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
Address 0x........ is not stack'd, malloc'd or (recently) free'd

View File

@ -1,6 +1,6 @@
Syscall param write(buf) points to uninitialised byte(s)
at 0x........: write (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
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)

View File

@ -49,7 +49,7 @@ Conditional jump or move depends on uninitialised value(s)
Syscall param exit_group(exit_code) contains uninitialised byte(s)
at 0x........: _Exit (in /...libc...)
by 0x........: ...
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: main (origin4-many.c:39)

View File

@ -48,7 +48,7 @@ Conditional jump or move depends on uninitialised value(s)
Syscall param exit_group(exit_code) contains uninitialised byte(s)
at 0x........: _Exit (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: main (origin4-many.c:39)

View File

@ -2,7 +2,7 @@
Process terminating with default action of signal 11 (SIGSEGV)
Access not within mapped region at address 0x........
at 0x........: ???
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
If you believe this happened as a result of a stack overflow in your
program's main thread (unlikely but possible), you can try to increase
the size of the main thread stack using the --main-stacksize= flag.

File diff suppressed because it is too large Load Diff

View File

@ -3,4 +3,4 @@
-----------------------------------------------------
Syscall param exit_group(exit_code) contains uninitialised byte(s)
at 0x........: syscall (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)

View File

@ -1,11 +1,11 @@
Syscall param (syscallno) contains uninitialised byte(s)
at 0x........: syscall (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
Syscall param write(fd) contains uninitialised byte(s)
at 0x........: syscall (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
Syscall param write(count) contains uninitialised byte(s)
at 0x........: syscall (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)

View File

@ -4,7 +4,7 @@ FILE DESCRIPTORS: 4 open at exit.
Open file descriptor .: /tmp/file
at 0x........: creat (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
Open file descriptor .: .
<inherited from parent>

View File

@ -3,11 +3,11 @@
FILE DESCRIPTORS: 5 open at exit.
Open file descriptor .: /dev/null
at 0x........: dup (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
Open file descriptor .: /dev/null
at 0x........: open (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
Open file descriptor .: .
<inherited from parent>

View File

@ -3,7 +3,7 @@
FILE DESCRIPTORS: 5 open at exit.
Open file descriptor .: /dev/null
at 0x........: dup (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
Open file descriptor .: /dev/null
at 0x........: open (in /...libc...)

View File

@ -3,15 +3,15 @@
FILE DESCRIPTORS: 6 open at exit.
Open file descriptor .: /dev/null
at 0x........: dup2 (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
Open file descriptor .: /dev/null
at 0x........: dup2 (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
Open file descriptor .: /dev/null
at 0x........: open (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
Open file descriptor .: .
<inherited from parent>

View File

@ -3,11 +3,11 @@
FILE DESCRIPTORS: 6 open at exit.
Open file descriptor .: /dev/null
at 0x........: dup2 (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
Open file descriptor .: /dev/null
at 0x........: dup2 (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
Open file descriptor .: /dev/null
at 0x........: open (in /...libc...)

View File

@ -7,7 +7,7 @@ Open file descriptor .: /dev/null
Open file descriptor .: /dev/null
at 0x........: open (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
Open file descriptor .: .
<inherited from parent>

View File

@ -8,7 +8,7 @@ Open file descriptor .: /dev/null
Open file descriptor .: /dev/null
at 0x........: open (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
Open file descriptor .: .
<inherited from parent>

View File

@ -8,7 +8,7 @@ Open file descriptor .: /dev/null
Open file descriptor .: /dev/null
at 0x........: open (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
Open file descriptor .: .
<inherited from parent>

View File

@ -3,7 +3,7 @@
FILE DESCRIPTORS: 4 open at exit.
Open file descriptor .: /dev/null
at 0x........: open (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
Open file descriptor .: .
<inherited from parent>

View File

@ -3,11 +3,11 @@
FILE DESCRIPTORS: 5 open at exit.
Open file descriptor .:
at 0x........: pipe (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
Open file descriptor .:
at 0x........: pipe (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
Open file descriptor .: .
<inherited from parent>

View File

@ -3,11 +3,11 @@
FILE DESCRIPTORS: 5 open at exit.
Open AF_UNIX socket .: <unknown>
at 0x........: socketpair (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
Open AF_UNIX socket .: <unknown>
at 0x........: socketpair (in /...libc...)
by 0x........: (below main) (in /...libc...)
by 0x........: (below main)
Open file descriptor .: .
<inherited from parent>

View File

@ -18,7 +18,9 @@ while (<>)
s/\(in \/.*libc.*\)$/(in \/...libc...)/;
s/\(within \/.*libc.*\)$/(within \/...libc...)/;
s/\(below main\) \(.+\.[cS]:\d+\)$/(below main) (in \/...libc...)/;
# Remove the filename -- on some platforms (eg. Linux) it will be in
# libc, on some (eg. Darwin) it will be in the main executable.
s/\(below main\) \(.+\)$/(below main)/;
s/($libc_symbols) \(.+\.[cS]:\d+\)$/$1 (in \/...libc...)/;