From: Nicholas Nethercote Date: Mon, 16 Mar 2009 00:59:17 +0000 (+0000) Subject: - Turn exit_group() into exit() in the Memcheck filter, for greater X-Git-Tag: svn/VALGRIND_3_5_0~849 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c78a4f9c307df1288c0da2459292e4e06977a87d;p=thirdparty%2Fvalgrind.git - Turn exit_group() into exit() in the Memcheck filter, for greater determinism and portability. - Update the xml1 .exp files accordingly (getting rid of one which is no longer necessary). - Update origin4-many.stderr.exp accordingly. - Update the handling of scalar_exit_group accordingly. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9421 --- diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index 2d7934a3c6..df608cc0a5 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -172,8 +172,7 @@ EXTRA_DIST = $(noinst_SCRIPTS) \ wrap8.vgtest wrap8.stdout.exp wrap8.stderr.exp \ wrap8.stdout.exp2 wrap8.stderr.exp2 \ writev.stderr.exp writev.vgtest \ - xml1.stderr.exp xml1.stderr.exp2 \ - xml1.stderr.exp64 xml1.stdout.exp \ + xml1.stderr.exp32 xml1.stderr.exp64 xml1.stdout.exp \ xml1.vgtest check_PROGRAMS = \ diff --git a/memcheck/tests/filter_stderr b/memcheck/tests/filter_stderr index 6c94b0207f..3044a158f4 100755 --- a/memcheck/tests/filter_stderr +++ b/memcheck/tests/filter_stderr @@ -16,6 +16,10 @@ sed "s/mc_replace_strmem.c:[0-9]*/mc_replace_strmem.c:.../" | # Remove the size in "The main thread stack size..." message. sed "s/The main thread stack size used in this run was [0-9]*/The main thread stack size used in this run was .../" | +# Replace exit_group() with exit(), because you can get either on Linux +# depending on the system. +perl -p -e "s/param exit_group\(status\)/param exit(status)/" | + # Stack traces ending in syscalls often cause problems, with lots of libc # variations: different numbers of entries, line numbers or not depending on # whether libc debug info is present, 'writev' vs 'do_writev', 'main' vs. diff --git a/memcheck/tests/origin4-many.stderr.exp b/memcheck/tests/origin4-many.stderr.exp index 01ae70d55e..bef53f1341 100644 --- a/memcheck/tests/origin4-many.stderr.exp +++ b/memcheck/tests/origin4-many.stderr.exp @@ -46,7 +46,7 @@ Conditional jump or move depends on uninitialised value(s) at 0x........: malloc (vg_replace_malloc.c:...) by 0x........: main (origin4-many.c:39) -Syscall param exit_group(status) contains uninitialised byte(s) +Syscall param exit(status) contains uninitialised byte(s) ... Uninitialised value was created by a heap allocation at 0x........: malloc (vg_replace_malloc.c:...) diff --git a/memcheck/tests/x86-linux/Makefile.am b/memcheck/tests/x86-linux/Makefile.am index 9f78832210..c32296a777 100644 --- a/memcheck/tests/x86-linux/Makefile.am +++ b/memcheck/tests/x86-linux/Makefile.am @@ -1,7 +1,9 @@ include $(top_srcdir)/Makefile.tool-tests.am -noinst_SCRIPTS = filter_stderr +noinst_SCRIPTS = \ + filter_scalar_exit_group \ + filter_stderr noinst_HEADERS = scalar.h diff --git a/memcheck/tests/x86-linux/scalar_exit_group.vgtest b/memcheck/tests/x86-linux/scalar_exit_group.vgtest index 8b0c2b6872..9cfa33c095 100644 --- a/memcheck/tests/x86-linux/scalar_exit_group.vgtest +++ b/memcheck/tests/x86-linux/scalar_exit_group.vgtest @@ -1,2 +1,3 @@ prog: scalar_exit_group vgopts: -q +stderr_filter: filter_scalar_exit_group diff --git a/memcheck/tests/xml1.stderr.exp b/memcheck/tests/xml1.stderr.exp deleted file mode 100644 index 5f982d0649..0000000000 --- a/memcheck/tests/xml1.stderr.exp +++ /dev/null @@ -1,433 +0,0 @@ - - - - -3 - - - ... - ... - ... - ... - ... - ... - - -... -... -memcheck - - - ... - - ./xml1 - - - - - RUNNING - - - - - 0x........ - ... - InvalidRead - Invalid read of size 4 - - - 0x........ - ... - frame3 - ... - xml1.c - ... - - - 0x........ - ... - frame2 - ... - xml1.c - ... - - - 0x........ - ... - frame1 - ... - xml1.c - ... - - - 0x........ - ... - main - ... - xml1.c - ... - - - Address 0x........ is 0 bytes after a block of size 40 alloc'd - - - 0x........ - ... - malloc - ... - vg_replace_malloc.c - ... - - - 0x........ - ... - frame3 - ... - xml1.c - ... - - - 0x........ - ... - frame2 - ... - xml1.c - ... - - - 0x........ - ... - frame1 - ... - xml1.c - ... - - - 0x........ - ... - main - ... - xml1.c - ... - - - - - - 0x........ - ... - UninitCondition - Conditional jump or move depends on uninitialised value(s) - - - 0x........ - ... - frame3 - ... - xml1.c - ... - - - 0x........ - ... - frame2 - ... - xml1.c - ... - - - 0x........ - ... - frame1 - ... - xml1.c - ... - - - 0x........ - ... - main - ... - xml1.c - ... - - - - - - 0x........ - ... - UninitValue - Use of uninitialised value of size 4 - - - 0x........ - ... - frame3 - ... - xml1.c - ... - - - 0x........ - ... - frame2 - ... - xml1.c - ... - - - 0x........ - ... - frame1 - ... - xml1.c - ... - - - 0x........ - ... - main - ... - xml1.c - ... - - - - - - 0x........ - ... - InvalidFree - Invalid free() / delete / delete[] - - - 0x........ - ... - free - ... - vg_replace_malloc.c - ... - - - 0x........ - ... - frame3 - ... - xml1.c - ... - - - 0x........ - ... - frame2 - ... - xml1.c - ... - - - 0x........ - ... - frame1 - ... - xml1.c - ... - - - 0x........ - ... - main - ... - xml1.c - ... - - - Address 0x........ is 0 bytes inside a block of size 40 free'd - - - 0x........ - ... - free - ... - vg_replace_malloc.c - ... - - - 0x........ - ... - frame3 - ... - xml1.c - ... - - - 0x........ - ... - frame2 - ... - xml1.c - ... - - - 0x........ - ... - frame1 - ... - xml1.c - ... - - - 0x........ - ... - main - ... - xml1.c - ... - - - - - - 0x........ - ... - InvalidFree - Invalid free() / delete / delete[] - - - 0x........ - ... - free - ... - vg_replace_malloc.c - ... - - - 0x........ - ... - frame3 - ... - xml1.c - ... - - - 0x........ - ... - frame2 - ... - xml1.c - ... - - - 0x........ - ... - frame1 - ... - xml1.c - ... - - - 0x........ - ... - main - ... - xml1.c - ... - - - Address 0x........ is on thread 1's stack - - - - 0x........ - ... - SyscallParam - Syscall param exit_group(status) contains uninitialised byte(s) - - - - - ... - 0x........ - - - ... - 0x........ - - - ... - 0x........ - - - ... - 0x........ - - - ... - 0x........ - - - ... - 0x........ - - - - - FINISHED - - - -... - - - 0x........ - ... - Leak_DefinitelyLost - 396 bytes in 1 blocks are definitely lost in loss record ... of ... - 396 - 1 - - - 0x........ - ... - malloc - ... - vg_replace_malloc.c - ... - - - 0x........ - ... - frame3 - ... - xml1.c - ... - - - 0x........ - ... - frame2 - ... - xml1.c - ... - - - 0x........ - ... - frame1 - ... - xml1.c - ... - - - 0x........ - ... - main - ... - xml1.c - ... - - - - - - diff --git a/memcheck/tests/xml1.stderr.exp2 b/memcheck/tests/xml1.stderr.exp32 similarity index 100% rename from memcheck/tests/xml1.stderr.exp2 rename to memcheck/tests/xml1.stderr.exp32 diff --git a/memcheck/tests/xml1.stderr.exp64 b/memcheck/tests/xml1.stderr.exp64 index 6ca5b82a54..c83a95f35d 100644 --- a/memcheck/tests/xml1.stderr.exp64 +++ b/memcheck/tests/xml1.stderr.exp64 @@ -341,7 +341,7 @@ 0x........ ... SyscallParam - Syscall param exit_group(status) contains uninitialised byte(s) + Syscall param exit(status) contains uninitialised byte(s)