memcheck/tests/sh-mem-random.c: Set huge_addr to 240GB
[valgrind.git] / drd / tests / filter_stderr.in
blob485a588b898bda647d3235037925bb4d76d95fa5
1 #! /bin/sh
2 # @configure_input@
4 dir=`dirname $0`
6 SED=@SED@
8 $SED -e "s:_pthread_start (in /usr/lib/libSystem.B.dylib):(within libpthread-?.?.so):" |
10 $dir/../../tests/filter_stderr_basic |
12 # Perform Solaris-specific filtering.
13 if $dir/../../tests/os_test solaris; then
14 perl -p $dir/filter_stderr_solaris
15 else
16 cat
17 fi |
19 # Remove "drd, ..." line and the following copyright line.
20 # Remove line numbers referring to drd's source code.
21 # Remove libpthread's version number.
22 # Remove line numbers from stack traces.
23 # Extract start_thread because it can be in libpthread or libc.
24 $SED \
25 -e "/^drd, a thread error detector$/d" \
26 -e "s/^Allocation context: stack of thread \([0-9]*\), offset -[0-9]*$/Allocation context: stack of thread \1, offset .../" \
27 -e "/^warning: evaluate_Dwarf3_Expr: unhandled DW_OP_.*/d" \
28 -e '/^warning: addVar:.*/d' \
29 -e 's/^Allocation context: Data section of .\//Allocation context: BSS section of /' \
30 -e '/^run: \/usr\/bin\/dsymutil.*/d' \
31 -e "s/, in frame #[0-9]* of thread /, in frame #? of thread /" \
32 -e "s/(\(functional\|thread\):[0-9]*)/(\1:...)/" \
33 -e "s/(tc20_verifywrap.c:261)/(tc20_verifywrap.c:262)/" \
34 -e "/^Copyright (C) 2006-20.., and GNU GPL'd, by Bart Van Assche et al.$/d" \
35 -e "s/start_thread ([^)]*)/start_thread/" \
36 -e "s/\([A-Za-z_]*\) (clone.S:[0-9]*)/\1 (in \/...libc...)/" \
37 -e "s/\([A-Za-z_]*\) (swapcontext.S:[0-9]*)/\1 (in \/...libc...)/" \
38 -e "s/_swapcontext/swapcontext/" \
39 -e "s/[A-Za-z_]* (pthread_create.c:[0-9]*)/(within libpthread-?.?.so)/" \
40 -e "s/[A-Za-z_]* (in [^ ]*libpthread-[0-9.]*\.so)/(within libpthread-?.?.so)/" \
41 -e "s/... (in \/lib\/libthr.so.3)/start_thread/" \
42 -e "s:(within /lib[0-9]*/ld-[0-9.]*\.so):(within ld-?.?.so):" \
43 -e "s/was held during [0-9][0-9]*/was held during .../" \
44 -e "s: BSS section of [^<]*/: BSS section of :g" \
45 -e "s: vc \[[ ,:0-9]*\]: vc ...:g" \
46 -e "s/[@\$*]* (drd_pthread_intercepts.c:/ (drd_pthread_intercepts.c:/" \
47 -e "/\(pthread\|sem\)_[a-zA-Z0-9_]*_intercept/d" \
48 -e "s/ (\([a-zA-Z_]*\.c\):[0-9]*)/ (\1:?)/" \
49 -e "s/ (\([a-zA-Z_]*\.h\):[0-9]*)/ (\1:?)/" \
50 -e "s/ (\([a-zA-Z_]*\.cpp\):[0-9]*)/ (\1:?)/" \
51 -e "s/\( name [^ ]*\)-[0-9]*\( oflag \)/\1\2/" \
52 -e "s/??? (in \/[A-Za-z0-9_/-]*)/???/" \
53 -e '/^ by 0x[0-9a-fA-F]*: process_dl_debug (in \/lib[0-9]*\/ld-[0-9.]*\.so)$/d' \
54 -e "/^For lists of detected and suppressed errors, rerun with: -s$/d" |
56 # Remove the message that more than hundred errors have been detected
57 # (consists of two lines) and also the empty line above it.
58 awk 'BEGIN{begin=1} {if ($0 == "More than 100 errors detected. Subsequent errors") { getline; getline; } else { if (begin) begin = 0; else print last_line; }; last_line = $0; } END { if (! begin) print last_line; }' |
60 # Remove the message about experimental support for Darwin.
61 awk 'BEGIN{begin=1} { if ($0 == "WARNING: DRD support for Darwin is still considered as experimental.") { getline; getline; } else { if (begin) begin = 0; else print last_line; }; last_line = $0; } END { if (! begin) print last_line; }' |
63 # Make sure the first line of a stack trace starts with "at"
64 awk '{ s = !match(prev, " by ") && !match(prev, " at ") && match($0, " by "); prev = $0; if (s) sub(" by ", " at ", $0); print }' |
66 # Remove <frame>...<file>drd_pthread_intercepts.c</file>...</frame>
67 awk '/^ <frame>$/ { in_frame = 1; line = 0; drd_pthread_intercepts = 0; fn = 0; } /^ <file>drd_pthread_intercepts.c<\/file>$/ { drd_pthread_intercepts = 1; } /^ <fn>/ { fn = 1; } { if (in_frame) frame[line++] = $0; else print; } /^ <\/frame>/ { if (in_frame) { if (!drd_pthread_intercepts || fn) for (i = 0; i < line; i++) { print frame[i]; }; in_frame = 0; } }' |
69 # Anonymise addresses
70 $dir/../../tests/filter_addresses