mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 18:13:01 +00:00
FreeBSD support, patch 9
cachegrind callgrind dhat exp-bbv gdbserver_tests massif none mpi shared Mostly these are just updates (and new testcases) under new/tests The other directories have just #ifdef changes
This commit is contained in:
parent
3d25fd4a6c
commit
53dd9bd255
1
.gitignore
vendored
1
.gitignore
vendored
@ -571,7 +571,6 @@
|
||||
/gdbserver_tests/filter_memcheck_monitor
|
||||
/gdbserver_tests/filter_stderr
|
||||
/gdbserver_tests/filter_vgdb
|
||||
/gdbserver_tests/filter_vgdb.in.orig
|
||||
/gdbserver_tests/.deps
|
||||
/gdbserver_tests/clean_after_fork
|
||||
/gdbserver_tests/detailed
|
||||
|
||||
@ -1726,7 +1726,7 @@ void collect_time (struct vki_timespec *systime, struct vki_timespec *syscputime
|
||||
break;
|
||||
}
|
||||
case systime_nsec:
|
||||
# if defined(VGO_linux) || defined(VGO_solaris)
|
||||
# if defined(VGO_linux) || defined(VGO_solaris) || defined(VGO_freebsd)
|
||||
VG_(clock_gettime)(systime, VKI_CLOCK_MONOTONIC);
|
||||
VG_(clock_gettime)(syscputime, VKI_CLOCK_THREAD_CPUTIME_ID);
|
||||
|
||||
|
||||
@ -5189,6 +5189,7 @@ AC_CONFIG_FILES([
|
||||
none/tests/linux/Makefile
|
||||
none/tests/darwin/Makefile
|
||||
none/tests/solaris/Makefile
|
||||
none/tests/freebsd/Makefile
|
||||
none/tests/amd64-linux/Makefile
|
||||
none/tests/x86-linux/Makefile
|
||||
none/tests/amd64-darwin/Makefile
|
||||
@ -5215,6 +5216,14 @@ AC_CONFIG_FILES([tests/filter_stderr_basic],
|
||||
[chmod +x tests/filter_stderr_basic])
|
||||
AC_CONFIG_FILES([tests/filter_discards],
|
||||
[chmod +x tests/filter_discards])
|
||||
AC_CONFIG_FILES([gdbserver_tests/filter_gdb],
|
||||
[chmod +x gdbserver_tests/filter_gdb])
|
||||
AC_CONFIG_FILES([gdbserver_tests/filter_memcheck_monitor],
|
||||
[chmod +x gdbserver_tests/filter_memcheck_monitor])
|
||||
AC_CONFIG_FILES([gdbserver_tests/filter_stderr],
|
||||
[chmod +x gdbserver_tests/filter_stderr])
|
||||
AC_CONFIG_FILES([gdbserver_tests/filter_vgdb],
|
||||
[chmod +x gdbserver_tests/filter_vgdb])
|
||||
AC_CONFIG_FILES([drd/tests/filter_stderr],
|
||||
[chmod +x drd/tests/filter_stderr])
|
||||
AC_CONFIG_FILES([drd/tests/filter_error_count],
|
||||
|
||||
@ -43,7 +43,7 @@ void f(char* a, char* b, wchar_t* wa, wchar_t* wb) {
|
||||
memcpy (a, b, 1000); // Redirects to memmove
|
||||
memcpy (a, b, 1000); // Redirects to memmove
|
||||
memmove(a, b, 1000);
|
||||
#if defined(VGO_solaris) || defined(VGO_darwin)
|
||||
#if defined(VGO_solaris) || defined(VGO_darwin) || (defined(VGO_freebsd) && defined(__GNUC__))
|
||||
memcpy(a, b, 1000);
|
||||
#else
|
||||
mempcpy(a, b, 1000);
|
||||
|
||||
@ -48,7 +48,7 @@ rep_loop:
|
||||
#================================
|
||||
exit:
|
||||
mov $1,%eax
|
||||
#if defined(VGO_darwin)
|
||||
#if defined(VGO_darwin) || defined(VGO_freebsd)
|
||||
pushl $0 # we return 0
|
||||
int $0x80 # and exit
|
||||
#elif defined(VGO_linux)
|
||||
|
||||
@ -99,7 +99,7 @@ big_loop:
|
||||
|
||||
print_error:
|
||||
mov $4,%eax # write syscall
|
||||
#if defined(VGO_darwin)
|
||||
#if defined(VGO_darwin) || defined(VGO_freebsd)
|
||||
pushl $22
|
||||
pushl $error
|
||||
pushl $1
|
||||
@ -120,7 +120,7 @@ print_error:
|
||||
|
||||
exit:
|
||||
movl $1, %eax # SYSCALL_EXIT
|
||||
#if defined(VGO_darwin)
|
||||
#if defined(VGO_darwin) || defined(VGO_freebsd)
|
||||
pushl result
|
||||
int $0x80
|
||||
#elif defined(VGO_linux)
|
||||
|
||||
@ -22,7 +22,7 @@ test_loop:
|
||||
exit:
|
||||
xor %eax,%eax
|
||||
inc %eax # put exit syscall number (1) in eax
|
||||
#if defined(VGO_darwin)
|
||||
#if defined(VGO_darwin) || defined(VGO_freebsd)
|
||||
pushl $0 # we return 0
|
||||
int $0x80 # and exit
|
||||
#elif defined(VGO_linux)
|
||||
@ -31,6 +31,9 @@ exit:
|
||||
#elif defined(VGO_solaris)
|
||||
pushl $0 # we return 0
|
||||
int $0x91 # and exit
|
||||
#elif defined(VGO_freebsd)
|
||||
mov $0x1,%eax # we return 0
|
||||
int $0x80 # and exit
|
||||
#else
|
||||
# error "Unknown OS"
|
||||
#endif
|
||||
|
||||
@ -246,7 +246,7 @@ compare_noteq:
|
||||
print_error:
|
||||
|
||||
mov $4, %eax # Write syscall
|
||||
#if defined(VGO_darwin)
|
||||
#if defined(VGO_darwin) || defined(VGO_freebsd)
|
||||
pushl $16
|
||||
pushl $error_string
|
||||
pushl $1
|
||||
@ -271,7 +271,7 @@ print_error:
|
||||
exit:
|
||||
xor %eax,%eax
|
||||
inc %eax # put exit syscall number (1) in eax
|
||||
#if defined(VGO_darwin)
|
||||
#if defined(VGO_darwin) || defined(VGO_freebsd)
|
||||
pushl $0 # we return 0
|
||||
int $0x80 # and exit
|
||||
#elif defined(VGO_linux)
|
||||
|
||||
2
gdbserver_tests/Makefile.am
Normal file → Executable file
2
gdbserver_tests/Makefile.am
Normal file → Executable file
@ -86,11 +86,13 @@ EXTRA_DIST = \
|
||||
mcsignopass.stderr.exp \
|
||||
mcsignopass.stdinB.gdb \
|
||||
mcsignopass.stdoutB.exp \
|
||||
mcsignopass.stdoutB.exp-freebsd \
|
||||
mcsignopass.vgtest \
|
||||
mcsigpass.stderrB.exp \
|
||||
mcsigpass.stderr.exp \
|
||||
mcsigpass.stdinB.gdb \
|
||||
mcsigpass.stdoutB.exp \
|
||||
mcsigpass.stdoutB.exp-freebsd \
|
||||
mcsigpass.vgtest \
|
||||
mcvabits.stderrB.exp \
|
||||
mcvabits.stderr.exp \
|
||||
|
||||
@ -2,6 +2,8 @@
|
||||
|
||||
# filter the output of gdb.
|
||||
|
||||
SED=/usr/bin/sed
|
||||
|
||||
PATTERNFILE=$(mktemp filter_gdb.tmp.XXXXXXXXXX)
|
||||
cat > $PATTERNFILE <<EOF
|
||||
# delete the initial lines between the launch of vgdb and the
|
||||
@ -25,6 +27,11 @@ s/^\[?1034hReading symbols/Reading symbols/
|
||||
# suppress lines telling file _exit.c does not exist
|
||||
/\/_exit.c: No such file or directory/d
|
||||
|
||||
# On FreeBSD if the base and/or lib32 dbg components
|
||||
# are installed but not system source then these
|
||||
# errors get produced by GDB
|
||||
/\(rtld_start.S\|kill.S\|_exit.S\|_select.S\): No such file or directory/d
|
||||
|
||||
# Remove some Suse package manager messages
|
||||
/^Try: zypper install -C/d
|
||||
|
||||
@ -136,6 +143,15 @@ s/in \.__select ()$/in syscall .../
|
||||
# + yet another way to get a select system call
|
||||
s/in select () at \.\.\/sysdeps\/unix\/syscall-template\.S.*$/in syscall .../
|
||||
|
||||
# FreeBSD system call
|
||||
s/_select () at _select.S:.*$/0x........ in syscall .../
|
||||
|
||||
# FreeBSD system call again
|
||||
/in _select.S/d
|
||||
|
||||
# FreeBSD system call
|
||||
s/kill () at kill.S:.*$/0x........ in syscall .../
|
||||
|
||||
# filter out names which starts with a "."
|
||||
# such names are used for "function descriptors" on ppc64
|
||||
# bugzilla 406561
|
||||
@ -221,16 +237,16 @@ $dir/../tests/filter_addresses |
|
||||
$dir/filter_memcheck_monitor "$@" |
|
||||
|
||||
# memcheck filter might leave some "..." lines, we are not interested
|
||||
sed -e '/^\ \ \ \ \.\.\.$/d' |
|
||||
$SED -e '/^\ \ \ \ \.\.\.$/d' |
|
||||
|
||||
# Anonymise or remove, using the big list of PATTERN prepared above
|
||||
sed -f $PATTERNFILE |
|
||||
$SED -f $PATTERNFILE |
|
||||
|
||||
# remove all the lines telling where the SIGFPE was trapped.
|
||||
sed -e '/after trap SIGFPE/,/after continue SIGFPE/d' |
|
||||
$SED -e '/after trap SIGFPE/,/after continue SIGFPE/d' |
|
||||
|
||||
# join together two lines that gdb 7.1 splits in two (???)
|
||||
# (in a separate sed, as the below influences the behaviour of the other expressions)
|
||||
sed -e :a -e '$!N;s/\n at sleepers.c:39/ at sleepers.c:39/;ta' -e 'P;D'
|
||||
$SED -e :a -e '$!N;s/\n at sleepers.c:39/ at sleepers.c:39/;ta' -e 'P;D'
|
||||
|
||||
rm $PATTERNFILE
|
||||
|
||||
252
gdbserver_tests/filter_gdb.in
Executable file
252
gdbserver_tests/filter_gdb.in
Executable file
@ -0,0 +1,252 @@
|
||||
#! /bin/sh
|
||||
|
||||
# filter the output of gdb.
|
||||
|
||||
SED=@SED@
|
||||
|
||||
PATTERNFILE=$(mktemp filter_gdb.tmp.XXXXXXXXXX)
|
||||
cat > $PATTERNFILE <<EOF
|
||||
# delete the initial lines between the launch of vgdb and the
|
||||
# output of the echo command telling it is launched.
|
||||
# This removes a whole lot of uninteresting lines varying
|
||||
# with OS/glibc/gdb dep
|
||||
/Remote debugging using/,/vgdb launched process attached/d
|
||||
|
||||
# general way to delete uninteresting and varying lines.
|
||||
/filter_gdb BEGIN drop/,/filter_gdb END drop/d
|
||||
|
||||
# initial tty control character sent by gdb 7.0
|
||||
s/^\[?1034hReading symbols/Reading symbols/
|
||||
|
||||
# remove message about missing debuginfos
|
||||
/^Missing separate debuginfo/d
|
||||
|
||||
# remove messages about not being able to download debuginfos
|
||||
/^Download failed: /d
|
||||
|
||||
# suppress lines telling file _exit.c does not exist
|
||||
/\/_exit.c: No such file or directory/d
|
||||
|
||||
# On FreeBSD if the base and/or lib32 dbg components
|
||||
# are installed but not system source then these
|
||||
# errors get produced by GDB
|
||||
/\(rtld_start.S\|kill.S\|_exit.S\|_select.S\): No such file or directory/d
|
||||
|
||||
# Remove some Suse package manager messages
|
||||
/^Try: zypper install -C/d
|
||||
|
||||
# Remove vgdb message
|
||||
/relaying data between gdb and process/d
|
||||
|
||||
# Anonymise pid numbers
|
||||
s/pid [0-9][0-9]*/pid ..../g
|
||||
|
||||
# filter 'remote target killed' messages (produced by gdb >= 8.2)
|
||||
/(Remote target) killed/d
|
||||
|
||||
# Anonymise Thread numbers
|
||||
s/Thread [0-9][0-9]*/Thread ..../g
|
||||
|
||||
# delete thread switches
|
||||
/\[Switching to Thread ....\]/d
|
||||
|
||||
# ??? Probably we had a 'Switching ' message in front of
|
||||
# a frame line ?
|
||||
s/\(\[Switching to thread [1234] (Thread ....)\]\)#0/\1\n#0/
|
||||
|
||||
# Anonymise info threads output (e.g. which thread is running and syscall)
|
||||
s/^\([ \* ] [0-9] Thread .... (tid [0-9] VgTs_WaitSys) 0x........ in\).*$/\1 syscall .../
|
||||
|
||||
# Newer gdb say Thread .... hit Breakpoint, we expect just Breakpoint.
|
||||
s/^Thread .... hit Breakpoint /Breakpoint /
|
||||
|
||||
# We expect "Program received" instead of "Thread .... received"
|
||||
s/^Thread .... received /Program received /
|
||||
|
||||
s/#[0-9]\( 0x........ in sleeper_or_burner\)/#.\1/
|
||||
|
||||
# Some gdb versions don't show the source line:number after switching
|
||||
# threads in #0 0x........ in do_burn ().
|
||||
s/\(#0 0x........ in do_burn ()\) at sleepers.c:41/\1/
|
||||
|
||||
|
||||
# delete Reading symbols file lines
|
||||
# Note: The 'done.' in "Reading symbols from <exe>...done."
|
||||
# is optional (bugzilla 406357).
|
||||
/^Reading symbols from .*\.\.\.\(done\.\)\?/d
|
||||
|
||||
# delete Loaded symbols file lines
|
||||
/^Loaded symbols for .*$/d
|
||||
|
||||
# delete language switch messages.
|
||||
/^Current language.*/d
|
||||
/^The current source language is.*/d
|
||||
|
||||
# 'exited with code' and 'exited normally' are printed slightly
|
||||
# differently between gdb versions, normalize to "Program exited...".
|
||||
s/^.*\( exited with code [0-9]\+\).$/Program\1\./g
|
||||
s/^.*\( exited normally\).$/Program\1\./g
|
||||
|
||||
# remove gdb prompts.
|
||||
s/(gdb) //g
|
||||
|
||||
# remove gdb continuation prompts.
|
||||
s/^>[> ]*//
|
||||
|
||||
# remove gdb done prompts.
|
||||
/^done\.$/d
|
||||
|
||||
# anonymise a 'general' system calls stack trace part
|
||||
s/in _dl_sysinfo_int80 () from \/lib\/ld-linux.so.*/in syscall .../
|
||||
|
||||
# anonymise kill syscall.
|
||||
s/in kill ().*$/in syscall .../
|
||||
|
||||
# anonymise syscall on ppc64 (bugzilla #284305)
|
||||
s/in .*kill ().*$/in syscall .../
|
||||
|
||||
|
||||
s/in _dl_sysinfo_int80 ()/in syscall .../
|
||||
/^ from \/lib\/ld-linux.so.*$/d
|
||||
s/\(0x........\) in ?? () from \/lib.*$/\1 in syscall .../
|
||||
s/\(0x........\) in ?? ()$/\1 in syscall .../
|
||||
|
||||
# 4 expressions to cover glibc 2.27 way to do a select, such as
|
||||
# * 1 Thread 5548 (tid 1 VgTs_WaitSys) 0x0000000004f6203f in __GI___select (
|
||||
# nfds=0, readfds=0x0, writefds=0x0, exceptfds=0x0, timeout=0x30a0e0 <t>)
|
||||
# at ../sysdeps/unix/sysv/linux/select.c:41
|
||||
# If select.c sources are present, we can also get a line containing:
|
||||
# return SYSCALL_CANCEL....
|
||||
s/in __select .*/in syscall .../
|
||||
s/in __select$/in syscall .../
|
||||
/nfds=/d
|
||||
/exceptfds=/d
|
||||
/timeout=/d
|
||||
/sysv\/linux\/select\.c/d
|
||||
/sysv\/linux\/generic\/select.c/d
|
||||
/return SYSCALL_CANCEL /d
|
||||
|
||||
# a more specialised system call select stack trace part
|
||||
# (on 32 bits, we have an int_80, on 64 bits, directly select)
|
||||
s/in \(.__\)\{0,1\}select () from \/.*$/in syscall .../
|
||||
|
||||
/^ from \/lib\/libc.so.*$/d
|
||||
/^ from \/lib64\/libc.so.*$/d
|
||||
/^ from \/lib64\/.*\/libc.so.*$/d
|
||||
|
||||
# and yet another (gdb 7.0 way) to get a system call
|
||||
s/in select ()$/in syscall .../
|
||||
|
||||
# and yet another (gdb 7.0 arm way) to get a system call
|
||||
s/in \.__select ()$/in syscall .../
|
||||
|
||||
# + yet another way to get a select system call
|
||||
s/in select () at \.\.\/sysdeps\/unix\/syscall-template\.S.*$/in syscall .../
|
||||
|
||||
# FreeBSD system call
|
||||
s/_select () at _select.S:.*$/0x........ in syscall .../
|
||||
|
||||
# FreeBSD system call again
|
||||
/in _select.S/d
|
||||
|
||||
# FreeBSD system call
|
||||
s/kill () at kill.S:.*$/0x........ in syscall .../
|
||||
|
||||
# filter out names which starts with a "."
|
||||
# such names are used for "function descriptors" on ppc64
|
||||
# bugzilla 406561
|
||||
s/in \.__select () at \.\.\/sysdeps\/unix\/syscall-template\.S.*$/in syscall .../
|
||||
|
||||
# cleanup some lines for a system call (on ubuntu 10 64 bits)
|
||||
# (pay attention : there are tab characters there in)
|
||||
/^[ ]*at \.\.\/sysdeps\/unix\/syscall-template\.S/d
|
||||
/^[ ]*in \.\.\/sysdeps\/unix\/syscall-template\.S/d
|
||||
|
||||
/^[1-9][0-9]*[ ]*\.\.\/sysdeps\/unix\/syscall-template\.S/d
|
||||
/^[1-9][0-9]*[ ]in *\.\.\/sysdeps\/unix\/syscall-template\.S/d
|
||||
/^[1-9][0-9]*[ ]T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)/d
|
||||
|
||||
# and yet another (Solaris way) to get a poll system call
|
||||
# (on 32 bits, we have /lib/libc.so.*, on 64 bits, /lib/64/libc.so.*)
|
||||
s/in __pollsys () from \/.*$/in syscall .../
|
||||
/^ from \/lib\/64\/libc.so.*$/d
|
||||
|
||||
# which registers can't be modified
|
||||
s/\(Could not write register \)".*"/\1 "xxx"/
|
||||
s/\(ERROR changing register \).*$/\1 xxx regno y/
|
||||
|
||||
# special transform for arm/ppc watchpoints which have an additional address
|
||||
# at the beginning
|
||||
s/0x........ in \(main (argc=1, argv=0x........) at watchpoints.c:[24][3689]\)/\1/
|
||||
|
||||
s/0x........ in \(main () at clean_after_fork.c:34\)/\1/
|
||||
|
||||
# SIGFPE backtrace is varying so much that we just remove all lines
|
||||
# after the signal trapping using an expr in this sed, followed by another sed.
|
||||
s/\(^.*signal SIGFPE.*$\)/\1\nafter trap SIGFPE/
|
||||
|
||||
# gdb might also try to show the "entry value" p=p@entry=0x...
|
||||
s/p=p@entry=0x/p=0x/
|
||||
|
||||
# for hgtls the breakpoint p=... address might show var location.
|
||||
s/\(^Breakpoint 1, tls_ptr (p=0x........\) <tests[0-9+]*>\() at tls.c:55\)/\1\2/
|
||||
|
||||
/Id Target Id *Frame/d
|
||||
s/^\([ \*] [1234] \) *Thread /\1Thread /
|
||||
|
||||
# Ordering of ' Thread .... (tid .' might differ between gdb version,
|
||||
# so remove all such lines except the "current" one (starts with '*').
|
||||
s/^ [0-9] Thread .... (tid [0-9] .*$//
|
||||
|
||||
# transform info thread of 7.3 into the layout of 7.2 and before.
|
||||
s/VgTs_WaitSys) 0x/VgTs_WaitSys) 0x/
|
||||
|
||||
# delete lines telling that some memory can't be accessed: this is
|
||||
# a.o. produced by gdb 7.2 on arm (same with standard gdbserver)
|
||||
/Cannot access memory at address 0x......../d
|
||||
|
||||
# Filter 'New thread' lines
|
||||
# gdb 7.9 reports new threads at different moment than the previous versions.
|
||||
# Filter these new threads lines so as to not be dependent on this
|
||||
# gdb aspect.
|
||||
/\[New Thread/d
|
||||
|
||||
# 406355
|
||||
# adjust filtering for the new gdb output
|
||||
# mcsigpass and mcsignopass tests fails due to the slightly different
|
||||
# gdb output. Filter the tests output to make it the same for different
|
||||
# gdb version. Change mcsigpass and mcsignopass .exp to fit filtered
|
||||
# .out.
|
||||
s/^0x........ in \(\w\+ (\)/\1/
|
||||
|
||||
# delete empty lines (the last line (only made of prompts) sometimes
|
||||
# finishes with a new line, sometimes not ???).
|
||||
/^$/d
|
||||
|
||||
|
||||
EOF
|
||||
|
||||
dir=`dirname $0`
|
||||
|
||||
$dir/filter_stderr |
|
||||
|
||||
# Anonymise addresses
|
||||
$dir/../tests/filter_addresses |
|
||||
|
||||
# memcheck stuff
|
||||
$dir/filter_memcheck_monitor "$@" |
|
||||
|
||||
# memcheck filter might leave some "..." lines, we are not interested
|
||||
$SED -e '/^\ \ \ \ \.\.\.$/d' |
|
||||
|
||||
# Anonymise or remove, using the big list of PATTERN prepared above
|
||||
$SED -f $PATTERNFILE |
|
||||
|
||||
# remove all the lines telling where the SIGFPE was trapped.
|
||||
$SED -e '/after trap SIGFPE/,/after continue SIGFPE/d' |
|
||||
|
||||
# join together two lines that gdb 7.1 splits in two (???)
|
||||
# (in a separate sed, as the below influences the behaviour of the other expressions)
|
||||
$SED -e :a -e '$!N;s/\n at sleepers.c:39/ at sleepers.c:39/;ta' -e 'P;D'
|
||||
|
||||
rm $PATTERNFILE
|
||||
@ -12,6 +12,8 @@ $dir/filter_vgdb |
|
||||
# Perform Solaris-specific filtering.
|
||||
if $dir/../tests/os_test solaris; then
|
||||
$dir/filter_helgrind_monitor_solaris
|
||||
elif $dir/../tests/os_test freebsd; then
|
||||
gsed -e '/\(rtld_start.S\|kill.S\|_exit.S\|_select.S\): No such file or directory/d'
|
||||
else
|
||||
cat
|
||||
fi |
|
||||
|
||||
@ -4,13 +4,14 @@
|
||||
|
||||
dir=`dirname $0`
|
||||
|
||||
SED=/usr/bin/sed
|
||||
|
||||
$dir/../memcheck/tests/filter_stderr "$@" |
|
||||
|
||||
# filter vgdb messages
|
||||
$dir/filter_vgdb |
|
||||
|
||||
|
||||
|
||||
# filter some normal error messages provided by some gdb
|
||||
#
|
||||
# gdb 7.2 sometimes tries to access address 0x0 (same as with standard gdbserver)
|
||||
@ -26,10 +27,10 @@ $dir/filter_vgdb |
|
||||
# When doing inferior function calls from gdb (in mcmain_pic) there might be
|
||||
# extra heap usage from gdb that we aren't interested in tracking.
|
||||
#
|
||||
sed -e '/Cannot access memory at address 0x......../d' \
|
||||
$SED -e '/Cannot access memory at address 0x......../d' \
|
||||
-e '/^[1-9][0-9]* \.\.\/sysdeps\/powerpc\/powerpc32\/dl-start\.S: No such file or directory\./d' \
|
||||
-e '/^Missing separate debuginfo/d' \
|
||||
-e '/^Try: zypper install -C/d' \
|
||||
-e 's/Test 3: FAIL: expected si_code==2, not 128/Test 3: PASS/' \
|
||||
-e 's/in use at exit: [0-9][0-9]* bytes in [0-9][0-9]* blocks/in use at exit: ... bytes in ... blocks/' \
|
||||
-e 's/in use at exit: [0-9][0-9,]* bytes in [0-9][0-9]* blocks/in use at exit: ... bytes in ... blocks/' \
|
||||
-e '/^ total heap usage: /d'
|
||||
|
||||
36
gdbserver_tests/filter_memcheck_monitor.in
Executable file
36
gdbserver_tests/filter_memcheck_monitor.in
Executable file
@ -0,0 +1,36 @@
|
||||
#! /bin/sh
|
||||
|
||||
# used to filter memcheck output shown by gdb/vgdb.
|
||||
|
||||
dir=`dirname $0`
|
||||
|
||||
SED=@SED@
|
||||
|
||||
$dir/../memcheck/tests/filter_stderr "$@" |
|
||||
|
||||
# filter vgdb messages
|
||||
$dir/filter_vgdb |
|
||||
|
||||
|
||||
# filter some normal error messages provided by some gdb
|
||||
#
|
||||
# gdb 7.2 sometimes tries to access address 0x0 (same as with standard gdbserver)
|
||||
#
|
||||
# filter a debian 6.0/ppc32 line
|
||||
#
|
||||
# filter some missing info msg from s390
|
||||
#
|
||||
# Bypass a s390x kernel bug which makes faultstatus test3 fail. In our case, we are
|
||||
# not interested in checking the si_code, but rather the signal passing
|
||||
# in mcsig(no)pass
|
||||
#
|
||||
# When doing inferior function calls from gdb (in mcmain_pic) there might be
|
||||
# extra heap usage from gdb that we aren't interested in tracking.
|
||||
#
|
||||
$SED -e '/Cannot access memory at address 0x......../d' \
|
||||
-e '/^[1-9][0-9]* \.\.\/sysdeps\/powerpc\/powerpc32\/dl-start\.S: No such file or directory\./d' \
|
||||
-e '/^Missing separate debuginfo/d' \
|
||||
-e '/^Try: zypper install -C/d' \
|
||||
-e 's/Test 3: FAIL: expected si_code==2, not 128/Test 3: PASS/' \
|
||||
-e 's/in use at exit: [0-9][0-9,]* bytes in [0-9][0-9]* blocks/in use at exit: ... bytes in ... blocks/' \
|
||||
-e '/^ total heap usage: /d'
|
||||
@ -2,9 +2,11 @@
|
||||
|
||||
dir=`dirname $0`
|
||||
|
||||
SED=/usr/bin/sed
|
||||
|
||||
$dir/../tests/filter_stderr_basic |
|
||||
perl -0777 -p -e 's/error 4 Interrupted system call\nVG_\(poll\) failed \(old kernel \?\) retrying .*\n//g' |
|
||||
sed -e '/^Copyright (C) /d' \
|
||||
$SED -e '/^Copyright (C) /d' \
|
||||
\
|
||||
-e '/TO DEBUG THIS PROCESS USING GDB/d' \
|
||||
-e '/\/path\/to\/gdb/d' \
|
||||
|
||||
16
gdbserver_tests/filter_stderr.in
Executable file
16
gdbserver_tests/filter_stderr.in
Executable file
@ -0,0 +1,16 @@
|
||||
#! /bin/sh
|
||||
|
||||
dir=`dirname $0`
|
||||
|
||||
SED=@SED@
|
||||
|
||||
$dir/../tests/filter_stderr_basic |
|
||||
perl -0777 -p -e 's/error 4 Interrupted system call\nVG_\(poll\) failed \(old kernel \?\) retrying .*\n//g' |
|
||||
$SED -e '/^Copyright (C) /d' \
|
||||
\
|
||||
-e '/TO DEBUG THIS PROCESS USING GDB/d' \
|
||||
-e '/\/path\/to\/gdb/d' \
|
||||
-e '/and then give GDB the following command/d' \
|
||||
-e '/target remote |/d' \
|
||||
-e '/pid is optional if only one valgrind process is running/d' \
|
||||
-e '/warning: remote target does not support file transfer, attempting to access files from local filesystem./d'
|
||||
@ -2,25 +2,33 @@
|
||||
|
||||
dir=`dirname $0`
|
||||
|
||||
SED=/usr/bin/sed
|
||||
|
||||
$dir/filter_stderr |
|
||||
|
||||
# Anonymise addresses
|
||||
$dir/../tests/filter_addresses |
|
||||
|
||||
|
||||
# On FreeBSD if the base and/or lib32 dbg components
|
||||
# are installed but not system source then these
|
||||
# errors get produced by GDB
|
||||
$SED -e '/\(rtld_start.S\|kill.S\|_exit.S\|_select.S\): No such file or directory/d' |
|
||||
|
||||
# filter vgdb process id,
|
||||
# pid
|
||||
# gdb 7.2 sometimes tries to access address 0x0 (same as with standard gdbserver)
|
||||
# filter a debian 6.0/ppc32 line
|
||||
sed -e '/relaying data between gdb and process/d' \
|
||||
$SED -e '/relaying data between gdb and process/d' \
|
||||
-e 's/\(sending command .* to pid \)[0-9][0-9]*/\1..../' \
|
||||
-e '/Cannot access memory at address 0x......../d' \
|
||||
-e '/^[1-9][0-9]* \.\.\/sysdeps\/powerpc\/powerpc32\/dl-start\.S: No such file or directory\./d' |
|
||||
|
||||
# filter some debuginfo problems with ld.so and SLES11
|
||||
sed -e '/^1 rtld.c: No such file or directory\./d' |
|
||||
sed -e '/rtld.c: Inappropriate ioctl for device\./d' |
|
||||
$SED -e '/^1 rtld.c: No such file or directory\./d' |
|
||||
$SED -e '/rtld.c: Inappropriate ioctl for device\./d' |
|
||||
# similar for Debian 11.0 arm64
|
||||
sed -e '/_exit.c: Inappropriate ioctl for device\./d' |
|
||||
$SED -e '/_exit.c: Inappropriate ioctl for device\./d' |
|
||||
|
||||
# and filter out any remaining empty lines
|
||||
sed -e '/^$/d'
|
||||
$SED -e '/^$/d'
|
||||
|
||||
34
gdbserver_tests/filter_vgdb.in
Executable file
34
gdbserver_tests/filter_vgdb.in
Executable file
@ -0,0 +1,34 @@
|
||||
#! /bin/sh
|
||||
|
||||
dir=`dirname $0`
|
||||
|
||||
SED=@SED@
|
||||
|
||||
$dir/filter_stderr |
|
||||
|
||||
# Anonymise addresses
|
||||
$dir/../tests/filter_addresses |
|
||||
|
||||
|
||||
# On FreeBSD if the base and/or lib32 dbg components
|
||||
# are installed but not system source then these
|
||||
# errors get produced by GDB
|
||||
$SED -e '/\(rtld_start.S\|kill.S\|_exit.S\|_select.S\): No such file or directory/d' |
|
||||
|
||||
# filter vgdb process id,
|
||||
# pid
|
||||
# gdb 7.2 sometimes tries to access address 0x0 (same as with standard gdbserver)
|
||||
# filter a debian 6.0/ppc32 line
|
||||
$SED -e '/relaying data between gdb and process/d' \
|
||||
-e 's/\(sending command .* to pid \)[0-9][0-9]*/\1..../' \
|
||||
-e '/Cannot access memory at address 0x......../d' \
|
||||
-e '/^[1-9][0-9]* \.\.\/sysdeps\/powerpc\/powerpc32\/dl-start\.S: No such file or directory\./d' |
|
||||
|
||||
# filter some debuginfo problems with ld.so and SLES11
|
||||
$SED -e '/^1 rtld.c: No such file or directory\./d' |
|
||||
$SED -e '/rtld.c: Inappropriate ioctl for device\./d' |
|
||||
# similar for Debian 11.0 arm64
|
||||
$SED -e '/_exit.c: Inappropriate ioctl for device\./d' |
|
||||
|
||||
# and filter out any remaining empty lines
|
||||
$SED -e '/^$/d'
|
||||
@ -1,24 +1,24 @@
|
||||
vgdb-error value changed from 0 to 999999
|
||||
Breakpoint 1 at 0x........: file sleepers.c, line 74.
|
||||
Breakpoint 1 at 0x........: file sleepers.c, line 73.
|
||||
Continuing.
|
||||
Breakpoint 1, sleeper_or_burner (v=0x........) at sleepers.c:74
|
||||
74 int i = 0;
|
||||
Breakpoint 1, sleeper_or_burner (v=0x........) at sleepers.c:73
|
||||
73 int i = 0;
|
||||
Continuing.
|
||||
Breakpoint 1, sleeper_or_burner (v=0x........) at sleepers.c:74
|
||||
74 int i = 0;
|
||||
Breakpoint 1, sleeper_or_burner (v=0x........) at sleepers.c:73
|
||||
73 int i = 0;
|
||||
Continuing.
|
||||
Breakpoint 1, sleeper_or_burner (v=0x........) at sleepers.c:74
|
||||
74 int i = 0;
|
||||
Breakpoint 1, sleeper_or_burner (v=0x........) at sleepers.c:73
|
||||
73 int i = 0;
|
||||
Continuing.
|
||||
Breakpoint 1, sleeper_or_burner (v=0x........) at sleepers.c:74
|
||||
74 int i = 0;
|
||||
Breakpoint 1, sleeper_or_burner (v=0x........) at sleepers.c:73
|
||||
73 int i = 0;
|
||||
Continuing.
|
||||
Program received signal SIGTRAP, Trace/breakpoint trap.
|
||||
do_burn () at sleepers.c:41
|
||||
41 for (i = 0; i < burn; i++) loopnr++;
|
||||
do_burn () at sleepers.c:40
|
||||
40 for (i = 0; i < burn; i++) loopnr++;
|
||||
[Switching to thread 1 (Thread ....)]
|
||||
#0 0x........ in do_burn ()
|
||||
41 for (i = 0; i < burn; i++) loopnr++;
|
||||
#0 0x........ in do_burn () at sleepers.c:40
|
||||
40 for (i = 0; i < burn; i++) loopnr++;
|
||||
$1 = void
|
||||
[Switching to thread 2 (Thread ....)]
|
||||
#0 0x........ in syscall ...
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
# information via the gdbserver protocol packet qXfer:auxv:read:
|
||||
# The content of the auxv data can be shown by gdb using
|
||||
# gdb command 'info auxv'
|
||||
prereq: test -e gdb.pic && if ../tests/arch_test mips32 || ../tests/arch_test mips64 ; then echo "set heuristic-fence-post 999999" ; else echo '' ; fi > mcmain_pic.heur
|
||||
prereq: test -e gdb.pic && (! ../tests/os_test freebsd) && if ../tests/arch_test mips32 || ../tests/arch_test mips64 ; then echo "set heuristic-fence-post 999999" ; else echo '' ; fi > mcmain_pic.heur
|
||||
prog: main_pic
|
||||
vgopts: --tool=memcheck --vgdb=yes --vgdb-error=0 --vgdb-prefix=./vgdb-prefix-mcmain_pic
|
||||
stdout_filter: filter_gdb
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
(action at startup) vgdb me ...
|
||||
Test 1: Invalid write of size 4
|
||||
at 0x........: test1 (faultstatus.c:116)
|
||||
by 0x........: main (faultstatus.c:179)
|
||||
at 0x........: test1 (faultstatus.c:117)
|
||||
by 0x........: main (faultstatus.c:184)
|
||||
Address 0x........ is not stack'd, malloc'd or (recently) free'd
|
||||
PASS
|
||||
Test 2: PASS
|
||||
|
||||
@ -6,54 +6,54 @@ Signal Stop Print Pass to program Description
|
||||
SIGFPE Yes Yes Yes Arithmetic exception
|
||||
Continuing.
|
||||
Program received signal SIGSEGV, Segmentation fault.
|
||||
test1 () at faultstatus.c:116
|
||||
116 *BADADDR = 'x';
|
||||
test1 () at faultstatus.c:117
|
||||
117 *BADADDR = 'x';
|
||||
Continuing.
|
||||
Program received signal SIGSEGV, Segmentation fault.
|
||||
test1 () at faultstatus.c:116
|
||||
116 *BADADDR = 'x';
|
||||
test1 () at faultstatus.c:117
|
||||
117 *BADADDR = 'x';
|
||||
Continuing.
|
||||
Program received signal SIGSEGV, Segmentation fault.
|
||||
test1 () at faultstatus.c:116
|
||||
116 *BADADDR = 'x';
|
||||
test1 () at faultstatus.c:117
|
||||
117 *BADADDR = 'x';
|
||||
Continuing.
|
||||
Program received signal SIGSEGV, Segmentation fault.
|
||||
test1 () at faultstatus.c:116
|
||||
116 *BADADDR = 'x';
|
||||
test1 () at faultstatus.c:117
|
||||
117 *BADADDR = 'x';
|
||||
Continuing.
|
||||
Program received signal SIGSEGV, Segmentation fault.
|
||||
test1 () at faultstatus.c:116
|
||||
116 *BADADDR = 'x';
|
||||
test1 () at faultstatus.c:117
|
||||
117 *BADADDR = 'x';
|
||||
Continuing.
|
||||
Program received signal SIGSEGV, Segmentation fault.
|
||||
test1 () at faultstatus.c:116
|
||||
116 *BADADDR = 'x';
|
||||
test1 () at faultstatus.c:117
|
||||
117 *BADADDR = 'x';
|
||||
Continuing.
|
||||
Program received signal SIGSEGV, Segmentation fault.
|
||||
test1 () at faultstatus.c:116
|
||||
116 *BADADDR = 'x';
|
||||
test1 () at faultstatus.c:117
|
||||
117 *BADADDR = 'x';
|
||||
Continuing.
|
||||
Program received signal SIGSEGV, Segmentation fault.
|
||||
test1 () at faultstatus.c:116
|
||||
116 *BADADDR = 'x';
|
||||
test1 () at faultstatus.c:117
|
||||
117 *BADADDR = 'x';
|
||||
Continuing.
|
||||
Program received signal SIGSEGV, Segmentation fault.
|
||||
test1 () at faultstatus.c:116
|
||||
116 *BADADDR = 'x';
|
||||
test1 () at faultstatus.c:117
|
||||
117 *BADADDR = 'x';
|
||||
Continuing.
|
||||
Program received signal SIGSEGV, Segmentation fault.
|
||||
test1 () at faultstatus.c:116
|
||||
116 *BADADDR = 'x';
|
||||
test1 () at faultstatus.c:117
|
||||
117 *BADADDR = 'x';
|
||||
Continuing.
|
||||
Program received signal SIGSEGV, Segmentation fault.
|
||||
test1 () at faultstatus.c:116
|
||||
116 *BADADDR = 'x';
|
||||
test1 () at faultstatus.c:117
|
||||
117 *BADADDR = 'x';
|
||||
Signal Stop Print Pass to program Description
|
||||
SIGSEGV No Yes Yes Segmentation fault
|
||||
Continuing.
|
||||
Program received signal SIGSEGV, Segmentation fault.
|
||||
Program received signal SIGBUS, Bus error.
|
||||
test3 () at faultstatus.c:126
|
||||
126 mapping[FILESIZE+10];
|
||||
test3 () at faultstatus.c:127
|
||||
127 mapping[FILESIZE+10];
|
||||
Continuing.
|
||||
Program received signal SIGFPE, Arithmetic exception.
|
||||
|
||||
56
gdbserver_tests/mcsignopass.stdoutB.exp-freebsd
Normal file
56
gdbserver_tests/mcsignopass.stdoutB.exp-freebsd
Normal file
@ -0,0 +1,56 @@
|
||||
Signal Stop Print Pass to program Description
|
||||
SIGSEGV Yes Yes No Segmentation fault
|
||||
Signal Stop Print Pass to program Description
|
||||
SIGBUS Yes Yes Yes Bus error
|
||||
Signal Stop Print Pass to program Description
|
||||
SIGFPE Yes Yes Yes Arithmetic exception
|
||||
Continuing.
|
||||
Program received signal SIGSEGV, Segmentation fault.
|
||||
test1 () at faultstatus.c:117
|
||||
117 *BADADDR = 'x';
|
||||
Continuing.
|
||||
Program received signal SIGSEGV, Segmentation fault.
|
||||
test1 () at faultstatus.c:117
|
||||
117 *BADADDR = 'x';
|
||||
Continuing.
|
||||
Program received signal SIGSEGV, Segmentation fault.
|
||||
test1 () at faultstatus.c:117
|
||||
117 *BADADDR = 'x';
|
||||
Continuing.
|
||||
Program received signal SIGSEGV, Segmentation fault.
|
||||
test1 () at faultstatus.c:117
|
||||
117 *BADADDR = 'x';
|
||||
Continuing.
|
||||
Program received signal SIGSEGV, Segmentation fault.
|
||||
test1 () at faultstatus.c:117
|
||||
117 *BADADDR = 'x';
|
||||
Continuing.
|
||||
Program received signal SIGSEGV, Segmentation fault.
|
||||
test1 () at faultstatus.c:117
|
||||
117 *BADADDR = 'x';
|
||||
Continuing.
|
||||
Program received signal SIGSEGV, Segmentation fault.
|
||||
test1 () at faultstatus.c:117
|
||||
117 *BADADDR = 'x';
|
||||
Continuing.
|
||||
Program received signal SIGSEGV, Segmentation fault.
|
||||
test1 () at faultstatus.c:117
|
||||
117 *BADADDR = 'x';
|
||||
Continuing.
|
||||
Program received signal SIGSEGV, Segmentation fault.
|
||||
test1 () at faultstatus.c:117
|
||||
117 *BADADDR = 'x';
|
||||
Continuing.
|
||||
Program received signal SIGSEGV, Segmentation fault.
|
||||
test1 () at faultstatus.c:117
|
||||
117 *BADADDR = 'x';
|
||||
Continuing.
|
||||
Program received signal SIGSEGV, Segmentation fault.
|
||||
test1 () at faultstatus.c:117
|
||||
117 *BADADDR = 'x';
|
||||
Signal Stop Print Pass to program Description
|
||||
SIGSEGV No Yes Yes Segmentation fault
|
||||
Continuing.
|
||||
Program received signal SIGSEGV, Segmentation fault.
|
||||
Program received signal SIGSEGV, Segmentation fault.
|
||||
Program received signal SIGFPE, Arithmetic exception.
|
||||
@ -1,7 +1,7 @@
|
||||
(action at startup) vgdb me ...
|
||||
Test 1: Invalid write of size 4
|
||||
at 0x........: test1 (faultstatus.c:116)
|
||||
by 0x........: main (faultstatus.c:179)
|
||||
at 0x........: test1 (faultstatus.c:117)
|
||||
by 0x........: main (faultstatus.c:184)
|
||||
Address 0x........ is not stack'd, malloc'd or (recently) free'd
|
||||
PASS
|
||||
Test 2: PASS
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
Continuing.
|
||||
Program received signal SIGSEGV, Segmentation fault.
|
||||
test1 () at faultstatus.c:116
|
||||
116 *BADADDR = 'x';
|
||||
test1 () at faultstatus.c:117
|
||||
117 *BADADDR = 'x';
|
||||
Continuing.
|
||||
Program received signal SIGSEGV, Segmentation fault.
|
||||
test2 () at faultstatus.c:121
|
||||
121 mapping[0] = 'x';
|
||||
test2 () at faultstatus.c:122
|
||||
122 mapping[0] = 'x';
|
||||
Continuing.
|
||||
Program received signal SIGBUS, Bus error.
|
||||
test3 () at faultstatus.c:126
|
||||
126 mapping[FILESIZE+10];
|
||||
test3 () at faultstatus.c:127
|
||||
127 mapping[FILESIZE+10];
|
||||
Continuing.
|
||||
Program received signal SIGFPE, Arithmetic exception.
|
||||
|
||||
14
gdbserver_tests/mcsigpass.stdoutB.exp-freebsd
Normal file
14
gdbserver_tests/mcsigpass.stdoutB.exp-freebsd
Normal file
@ -0,0 +1,14 @@
|
||||
Continuing.
|
||||
Program received signal SIGSEGV, Segmentation fault.
|
||||
test1 () at faultstatus.c:117
|
||||
117 *BADADDR = 'x';
|
||||
Continuing.
|
||||
Program received signal SIGSEGV, Segmentation fault.
|
||||
test2 () at faultstatus.c:122
|
||||
122 mapping[0] = 'x';
|
||||
Continuing.
|
||||
Program received signal SIGSEGV, Segmentation fault.
|
||||
test3 () at faultstatus.c:127
|
||||
127 mapping[FILESIZE+10];
|
||||
Continuing.
|
||||
Program received signal SIGFPE, Arithmetic exception.
|
||||
@ -1,7 +1,7 @@
|
||||
Continuing.
|
||||
Program received signal SIGTRAP, Trace/breakpoint trap.
|
||||
do_burn () at sleepers.c:41
|
||||
41 for (i = 0; i < burn; i++) loopnr++;
|
||||
do_burn () at sleepers.c:40
|
||||
40 for (i = 0; i < burn; i++) loopnr++;
|
||||
> > > > > >1
|
||||
3
|
||||
$1 = 0
|
||||
|
||||
@ -24,8 +24,7 @@ static pid_t gettid_sys()
|
||||
#endif
|
||||
}
|
||||
// will be invoked from gdb.
|
||||
static void whoami(char *msg) __attribute__((unused));
|
||||
static void whoami(char *msg)
|
||||
void whoami(char *msg)
|
||||
{
|
||||
fprintf(stderr, "pid %ld Thread %ld %s\n", (long) getpid(), (long) gettid_sys(),
|
||||
msg);
|
||||
|
||||
@ -10,6 +10,7 @@ EXTRA_DIST = \
|
||||
basic2.post.exp basic2.stderr.exp basic2.vgtest \
|
||||
big-alloc.post.exp big-alloc.post.exp-64bit big-alloc.post.exp-ppc64 \
|
||||
big-alloc.stderr.exp big-alloc.vgtest \
|
||||
big-alloc.post.exp-x86-freebsd \
|
||||
deep-A.post.exp deep-A.stderr.exp deep-A.vgtest \
|
||||
deep-B.post.exp deep-B.stderr.exp deep-B.vgtest \
|
||||
deep-C.post.exp deep-C.stderr.exp deep-C.vgtest \
|
||||
@ -27,11 +28,13 @@ EXTRA_DIST = \
|
||||
mmapunmap.post.exp mmapunmap.post.exp-ppc64 \
|
||||
mmapunmap.stderr.exp mmapunmap.vgtest \
|
||||
new-cpp.post.exp new-cpp.stderr.exp new-cpp.vgtest \
|
||||
new-cpp.post.exp-freebsd new-cpp.post.exp-x86-freebsd-gcc \
|
||||
no-stack-no-heap.post.exp no-stack-no-heap.stderr.exp no-stack-no-heap.vgtest \
|
||||
null.post.exp null.stderr.exp null.vgtest \
|
||||
one.post.exp one.post.exp2 one.stderr.exp one.vgtest \
|
||||
overloaded-new.post.exp overloaded-new.post.exp-mips32 \
|
||||
overloaded-new.stderr.exp overloaded-new.vgtest \
|
||||
overloaded-new.post.exp-freebsd overloaded-new.post.exp-x86-freebsd-gcc \
|
||||
pages_as_heap.stderr.exp pages_as_heap.vgtest \
|
||||
peak.post.exp peak.stderr.exp peak.vgtest \
|
||||
peak2.post.exp peak2.stderr.exp peak2.vgtest \
|
||||
@ -49,7 +52,8 @@ EXTRA_DIST = \
|
||||
thresholds_10_10.post.exp \
|
||||
thresholds_10_10.stderr.exp thresholds_10_10.vgtest \
|
||||
zero1.post.exp zero1.stderr.exp zero1.vgtest \
|
||||
zero2.post.exp zero2.stderr.exp zero2.vgtest
|
||||
zero2.post.exp zero2.stderr.exp zero2.vgtest \
|
||||
overloaded-new.post.exp-freebsd
|
||||
|
||||
check_PROGRAMS = \
|
||||
alloc-fns \
|
||||
|
||||
54
massif/tests/big-alloc.post.exp-x86-freebsd
Normal file
54
massif/tests/big-alloc.post.exp-x86-freebsd
Normal file
@ -0,0 +1,54 @@
|
||||
--------------------------------------------------------------------------------
|
||||
Command: ./big-alloc
|
||||
Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
ms_print arguments: massif.out
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
MB
|
||||
100.0^ :
|
||||
| :
|
||||
| @@@@@@@:
|
||||
| @ :
|
||||
| :::::::@ :
|
||||
| : @ :
|
||||
| :::::::: @ :
|
||||
| : : @ :
|
||||
| :::::::: : @ :
|
||||
| : : : @ :
|
||||
| :::::::: : : @ :
|
||||
| : : : : @ :
|
||||
| ::::::::: : : : @ :
|
||||
| : : : : : @ :
|
||||
| :::::::: : : : : @ :
|
||||
| : : : : : : @ :
|
||||
| :::::::: : : : : : @ :
|
||||
| : : : : : : : @ :
|
||||
| :::::::: : : : : : : @ :
|
||||
| : : : : : : : : @ :
|
||||
0 +----------------------------------------------------------------------->MB
|
||||
0 100.0
|
||||
|
||||
Number of snapshots: 11
|
||||
Detailed snapshots: [9]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
0 0 0 0 0 0
|
||||
1 10,489,816 10,489,816 10,485,760 4,056 0
|
||||
2 20,979,632 20,979,632 20,971,520 8,112 0
|
||||
3 31,469,448 31,469,448 31,457,280 12,168 0
|
||||
4 41,959,264 41,959,264 41,943,040 16,224 0
|
||||
5 52,449,080 52,449,080 52,428,800 20,280 0
|
||||
6 62,938,896 62,938,896 62,914,560 24,336 0
|
||||
7 73,428,712 73,428,712 73,400,320 28,392 0
|
||||
8 83,918,528 83,918,528 83,886,080 32,448 0
|
||||
9 94,408,344 94,408,344 94,371,840 36,504 0
|
||||
99.96% (94,371,840B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->99.96% (94,371,840B) 0x........: main (big-alloc.c:12)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
10 104,898,160 104,898,160 104,857,600 40,560 0
|
||||
66
massif/tests/new-cpp.post.exp-freebsd
Normal file
66
massif/tests/new-cpp.post.exp-freebsd
Normal file
@ -0,0 +1,66 @@
|
||||
--------------------------------------------------------------------------------
|
||||
Command: ./new-cpp
|
||||
Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --ignore-fn=_GLOBAL__sub_I_eh_alloc.cc --ignore-fn=call_init.part.0
|
||||
ms_print arguments: massif.out
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
KB
|
||||
82.76^ #
|
||||
| ::#::
|
||||
| ::::#: :
|
||||
| ::: ::#: ::::::::::::::::::::::::::::::::
|
||||
| : : ::#: :::
|
||||
| : : ::#: :::
|
||||
| : : ::#: :::
|
||||
| : : ::#: :::
|
||||
| : : ::#: :::
|
||||
| : : ::#: :::
|
||||
| : : ::#: :::
|
||||
| : : ::#: :::
|
||||
| : : ::#: :::
|
||||
| : : ::#: :::
|
||||
| : : ::#: :::
|
||||
| : : ::#: :::
|
||||
| : : ::#: :::
|
||||
| : : ::#: :::
|
||||
| : : ::#: :::
|
||||
| : : ::#: :::
|
||||
0 +----------------------------------------------------------------------->KB
|
||||
0 165.5
|
||||
|
||||
Number of snapshots: 12
|
||||
Detailed snapshots: [6 (peak)]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
0 0 0 0 0 0
|
||||
1 72,712 72,712 72,704 8 0
|
||||
2 76,720 76,720 76,704 16 0
|
||||
3 80,728 80,728 80,704 24 0
|
||||
4 82,736 82,736 82,704 32 0
|
||||
5 84,744 84,744 84,704 40 0
|
||||
6 84,744 84,744 84,704 40 0
|
||||
99.95% (84,704B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->85.79% (72,704B) 0x........: ??? (in /usr/local/lib/gcc10/libstdc++.so.6.0.28)
|
||||
| ->85.79% (72,704B) 0x........: ??? (in /libexec/ld-elf.so.1)
|
||||
| ->85.79% (72,704B) 0x........: ??? (in /libexec/ld-elf.so.1)
|
||||
| ->85.79% (72,704B) 0x........: ??? (in /libexec/ld-elf.so.1)
|
||||
|
|
||||
->04.72% (4,000B) 0x........: main (new-cpp.cpp:19)
|
||||
|
|
||||
->04.72% (4,000B) 0x........: main (new-cpp.cpp:20)
|
||||
|
|
||||
->02.36% (2,000B) 0x........: main (new-cpp.cpp:21)
|
||||
|
|
||||
->02.36% (2,000B) 0x........: main (new-cpp.cpp:22)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
7 88,752 80,736 80,704 32 0
|
||||
8 92,760 76,728 76,704 24 0
|
||||
9 94,768 74,720 74,704 16 0
|
||||
10 96,776 72,712 72,704 8 0
|
||||
11 169,488 0 0 0 0
|
||||
66
massif/tests/new-cpp.post.exp-x86-freebsd-gcc
Normal file
66
massif/tests/new-cpp.post.exp-x86-freebsd-gcc
Normal file
@ -0,0 +1,66 @@
|
||||
--------------------------------------------------------------------------------
|
||||
Command: ./new-cpp
|
||||
Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --ignore-fn=_GLOBAL__sub_I_eh_alloc.cc --ignore-fn=call_init.part.0
|
||||
ms_print arguments: massif.out
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
KB
|
||||
30.26^ ####
|
||||
| #
|
||||
| :::#
|
||||
| ::: # :::::
|
||||
| : : # :
|
||||
| : : # :
|
||||
| :::::: : # : ::
|
||||
| : : : # : : ::
|
||||
| ::::: : : # : : : ::::::::::::::::::::::
|
||||
| : : : : # : : : :
|
||||
| : : : : # : : : :
|
||||
| : : : : # : : : :
|
||||
| : : : : # : : : :
|
||||
| : : : : # : : : :
|
||||
| : : : : # : : : :
|
||||
| : : : : # : : : :
|
||||
| : : : : # : : : :
|
||||
| : : : : # : : : :
|
||||
| : : : : # : : : :
|
||||
| : : : : # : : : :
|
||||
0 +----------------------------------------------------------------------->KB
|
||||
0 60.52
|
||||
|
||||
Number of snapshots: 12
|
||||
Detailed snapshots: [6 (peak)]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
0 0 0 0 0 0
|
||||
1 18,952 18,952 18,944 8 0
|
||||
2 22,960 22,960 22,944 16 0
|
||||
3 26,968 26,968 26,944 24 0
|
||||
4 28,976 28,976 28,944 32 0
|
||||
5 30,984 30,984 30,944 40 0
|
||||
6 30,984 30,984 30,944 40 0
|
||||
99.87% (30,944B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->61.14% (18,944B) 0x........: ??? (in /usr/local/lib/gcc9/libstdc++.so.6.0.28)
|
||||
| ->61.14% (18,944B) 0x........: ??? (in /libexec/ld-elf.so.1)
|
||||
| ->61.14% (18,944B) 0x........: ??? (in /libexec/ld-elf.so.1)
|
||||
| ->61.14% (18,944B) 0x........: ??? (in /libexec/ld-elf.so.1)
|
||||
|
|
||||
->12.91% (4,000B) 0x........: main (new-cpp.cpp:19)
|
||||
|
|
||||
->12.91% (4,000B) 0x........: main (new-cpp.cpp:20)
|
||||
|
|
||||
->06.45% (2,000B) 0x........: main (new-cpp.cpp:21)
|
||||
|
|
||||
->06.45% (2,000B) 0x........: main (new-cpp.cpp:22)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
7 34,992 26,976 26,944 32 0
|
||||
8 39,000 22,968 22,944 24 0
|
||||
9 41,008 20,960 20,944 16 0
|
||||
10 43,016 18,952 18,944 8 0
|
||||
11 61,968 0 0 0 0
|
||||
66
massif/tests/overloaded-new.post.exp-freebsd
Normal file
66
massif/tests/overloaded-new.post.exp-freebsd
Normal file
@ -0,0 +1,66 @@
|
||||
--------------------------------------------------------------------------------
|
||||
Command: ./overloaded-new
|
||||
Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --ignore-fn=_GLOBAL__sub_I_eh_alloc.cc --ignore-fn=call_init.part.0
|
||||
ms_print arguments: massif.out
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
KB
|
||||
82.76^ #
|
||||
| ::#::
|
||||
| ::::#: :
|
||||
| ::: ::#: ::::::::::::::::::::::::::::::::
|
||||
| : : ::#: :::
|
||||
| : : ::#: :::
|
||||
| : : ::#: :::
|
||||
| : : ::#: :::
|
||||
| : : ::#: :::
|
||||
| : : ::#: :::
|
||||
| : : ::#: :::
|
||||
| : : ::#: :::
|
||||
| : : ::#: :::
|
||||
| : : ::#: :::
|
||||
| : : ::#: :::
|
||||
| : : ::#: :::
|
||||
| : : ::#: :::
|
||||
| : : ::#: :::
|
||||
| : : ::#: :::
|
||||
| : : ::#: :::
|
||||
0 +----------------------------------------------------------------------->KB
|
||||
0 165.5
|
||||
|
||||
Number of snapshots: 12
|
||||
Detailed snapshots: [6 (peak)]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
0 0 0 0 0 0
|
||||
1 72,712 72,712 72,704 8 0
|
||||
2 76,720 76,720 76,704 16 0
|
||||
3 80,728 80,728 80,704 24 0
|
||||
4 82,736 82,736 82,704 32 0
|
||||
5 84,744 84,744 84,704 40 0
|
||||
6 84,744 84,744 84,704 40 0
|
||||
99.95% (84,704B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->85.79% (72,704B) 0x........: ??? (in /usr/local/lib/gcc10/libstdc++.so.6.0.28)
|
||||
| ->85.79% (72,704B) 0x........: ??? (in /libexec/ld-elf.so.1)
|
||||
| ->85.79% (72,704B) 0x........: ??? (in /libexec/ld-elf.so.1)
|
||||
| ->85.79% (72,704B) 0x........: ??? (in /libexec/ld-elf.so.1)
|
||||
|
|
||||
->04.72% (4,000B) 0x........: main (overloaded-new.cpp:49)
|
||||
|
|
||||
->04.72% (4,000B) 0x........: main (overloaded-new.cpp:50)
|
||||
|
|
||||
->02.36% (2,000B) 0x........: main (overloaded-new.cpp:51)
|
||||
|
|
||||
->02.36% (2,000B) 0x........: main (overloaded-new.cpp:52)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
7 88,752 80,736 80,704 32 0
|
||||
8 92,760 76,728 76,704 24 0
|
||||
9 94,768 74,720 74,704 16 0
|
||||
10 96,776 72,712 72,704 8 0
|
||||
11 169,488 0 0 0 0
|
||||
66
massif/tests/overloaded-new.post.exp-x86-freebsd-gcc
Normal file
66
massif/tests/overloaded-new.post.exp-x86-freebsd-gcc
Normal file
@ -0,0 +1,66 @@
|
||||
--------------------------------------------------------------------------------
|
||||
Command: ./overloaded-new
|
||||
Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --ignore-fn=_GLOBAL__sub_I_eh_alloc.cc --ignore-fn=call_init.part.0
|
||||
ms_print arguments: massif.out
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
KB
|
||||
30.26^ ####
|
||||
| #
|
||||
| :::#
|
||||
| ::: # :::::
|
||||
| : : # :
|
||||
| : : # :
|
||||
| :::::: : # : ::
|
||||
| : : : # : : ::
|
||||
| ::::: : : # : : : ::::::::::::::::::::::
|
||||
| : : : : # : : : :
|
||||
| : : : : # : : : :
|
||||
| : : : : # : : : :
|
||||
| : : : : # : : : :
|
||||
| : : : : # : : : :
|
||||
| : : : : # : : : :
|
||||
| : : : : # : : : :
|
||||
| : : : : # : : : :
|
||||
| : : : : # : : : :
|
||||
| : : : : # : : : :
|
||||
| : : : : # : : : :
|
||||
0 +----------------------------------------------------------------------->KB
|
||||
0 60.52
|
||||
|
||||
Number of snapshots: 12
|
||||
Detailed snapshots: [6 (peak)]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
0 0 0 0 0 0
|
||||
1 18,952 18,952 18,944 8 0
|
||||
2 22,960 22,960 22,944 16 0
|
||||
3 26,968 26,968 26,944 24 0
|
||||
4 28,976 28,976 28,944 32 0
|
||||
5 30,984 30,984 30,944 40 0
|
||||
6 30,984 30,984 30,944 40 0
|
||||
99.87% (30,944B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->61.14% (18,944B) 0x........: ??? (in /usr/local/lib/gcc9/libstdc++.so.6.0.28)
|
||||
| ->61.14% (18,944B) 0x........: ??? (in /libexec/ld-elf.so.1)
|
||||
| ->61.14% (18,944B) 0x........: ??? (in /libexec/ld-elf.so.1)
|
||||
| ->61.14% (18,944B) 0x........: ??? (in /libexec/ld-elf.so.1)
|
||||
|
|
||||
->12.91% (4,000B) 0x........: main (overloaded-new.cpp:49)
|
||||
|
|
||||
->12.91% (4,000B) 0x........: main (overloaded-new.cpp:50)
|
||||
|
|
||||
->06.45% (2,000B) 0x........: main (overloaded-new.cpp:51)
|
||||
|
|
||||
->06.45% (2,000B) 0x........: main (overloaded-new.cpp:52)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
7 34,992 26,976 26,944 32 0
|
||||
8 39,000 22,968 22,944 24 0
|
||||
9 41,008 20,960 20,944 16 0
|
||||
10 43,016 18,952 18,944 8 0
|
||||
11 61,968 0 0 0 0
|
||||
@ -1376,7 +1376,7 @@ static void maybe_complete ( Bool error_in_status,
|
||||
if (count_from_Status(&recv_count, shadow->datatype, status)) {
|
||||
make_mem_defined_if_addressable(shadow->buf, recv_count, shadow->datatype);
|
||||
if (opt_verbosity > 1)
|
||||
fprintf(stderr, "%s %5d: sReq- %p (completed)\n",
|
||||
fprintf(stderr, "%s %5d: sReq- %d (completed)\n",
|
||||
preamble, my_pid, request_before);
|
||||
}
|
||||
delete_shadow_Request(request_before);
|
||||
|
||||
@ -47,6 +47,9 @@ endif
|
||||
if VGCONF_OS_IS_SOLARIS
|
||||
SUBDIRS += solaris
|
||||
endif
|
||||
if VGCONF_OS_IS_FREEBSD
|
||||
SUBDIRS += freebsd
|
||||
endif
|
||||
|
||||
# Platform-specific tests
|
||||
if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
|
||||
@ -69,7 +72,7 @@ SUBDIRS += x86-solaris
|
||||
endif
|
||||
|
||||
DIST_SUBDIRS = x86 amd64 ppc32 ppc64 arm arm64 s390x mips32 mips64 nanomips \
|
||||
linux darwin solaris amd64-linux x86-linux amd64-darwin \
|
||||
linux darwin solaris freebsd amd64-linux x86-linux amd64-darwin \
|
||||
x86-darwin amd64-solaris x86-solaris scripts .
|
||||
|
||||
dist_noinst_SCRIPTS = \
|
||||
@ -90,7 +93,7 @@ EXTRA_DIST = \
|
||||
ansi.stderr.exp ansi.vgtest \
|
||||
args.stderr.exp args.stdout.exp args.vgtest \
|
||||
async-sigs.stderr.exp async-sigs.stderr.exp-mips32 \
|
||||
async-sigs.vgtest \
|
||||
async-sigs.vgtest async-sigs.stderr.exp-freebsd \
|
||||
bigcode.vgtest bigcode.stderr.exp bigcode.stdout.exp \
|
||||
bitfield1.stderr.exp bitfield1.vgtest \
|
||||
bug129866.vgtest bug129866.stderr.exp bug129866.stdout.exp \
|
||||
@ -142,7 +145,9 @@ EXTRA_DIST = \
|
||||
munmap_exe.stderr.exp munmap_exe.vgtest \
|
||||
nestedfns.stderr.exp nestedfns.stdout.exp nestedfns.vgtest \
|
||||
nocwd.stdout.exp nocwd.stderr.exp nocwd.vgtest \
|
||||
nocwd.stderr.exp-freebsd \
|
||||
nodir.stderr.exp nodir.vgtest \
|
||||
nodir.stderr.exp-freebsd \
|
||||
pending.stdout.exp pending.stderr.exp pending.vgtest \
|
||||
ppoll_alarm.stdout.exp ppoll_alarm.stderr.exp ppoll_alarm.vgtest \
|
||||
procfs-linux.stderr.exp-with-readlinkat \
|
||||
@ -181,6 +186,7 @@ EXTRA_DIST = \
|
||||
require-text-symbol-2.vgtest \
|
||||
require-text-symbol-2.stderr.exp-libcso1 \
|
||||
require-text-symbol-2.stderr.exp-libcso6 \
|
||||
require-text-symbol-2.stderr.exp-freebsd \
|
||||
res_search.stderr.exp res_search.stdout.exp res_search.vgtest \
|
||||
resolv.stderr.exp resolv.stdout.exp resolv.vgtest \
|
||||
rlimit_nofile.stderr.exp rlimit_nofile.stdout.exp rlimit_nofile.vgtest \
|
||||
|
||||
@ -97,7 +97,8 @@ EXTRA_DIST = \
|
||||
tm1.vgtest tm1.stderr.exp tm1.stdout.exp \
|
||||
x87trigOOR.vgtest x87trigOOR.stderr.exp x87trigOOR.stdout.exp \
|
||||
xacq_xrel.stderr.exp xacq_xrel.stdout.exp xacq_xrel.vgtest \
|
||||
xadd.stderr.exp xadd.stdout.exp xadd.vgtest
|
||||
xadd.stderr.exp xadd.stdout.exp xadd.vgtest \
|
||||
sse4-64.stdout.exp.freebsd sse4-64.stdout.exp-freebsd-clang
|
||||
|
||||
check_PROGRAMS = \
|
||||
allexec \
|
||||
|
||||
@ -14,7 +14,11 @@
|
||||
#define VG_STRINGIFZ(__str) #__str
|
||||
#define VG_STRINGIFY(__str) VG_STRINGIFZ(__str)
|
||||
|
||||
#if defined(VGO_linux) || defined(VGO_darwin)
|
||||
#if defined(VGO_linux) || defined(VGO_darwin) || defined(VGO_freebsd)
|
||||
#if !defined(__NR_readlink)
|
||||
# define __NR_readlink 58
|
||||
#endif
|
||||
|
||||
#define __NR_READLINK VG_STRINGIFY(__NR_readlink)
|
||||
|
||||
extern long my_readlink ( const char* path );
|
||||
|
||||
@ -18,7 +18,7 @@ struct test {
|
||||
|
||||
static const struct test *cur_test;
|
||||
|
||||
static jmp_buf escape;
|
||||
static sigjmp_buf escape;
|
||||
|
||||
#define BADADDR ((int *)0x1234)
|
||||
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
prog: ../../../none/tests/amd64/insn_ssse3
|
||||
prereq: ../../../tests/x86_amd64_features amd64-ssse3
|
||||
prereq: ../../../tests/x86_amd64_features amd64-ssse3 && test -e insn_ssse3
|
||||
vgopts: -q
|
||||
|
||||
5618
none/tests/amd64/sse4-64.stdout.exp-freebsd-clang
Normal file
5618
none/tests/amd64/sse4-64.stdout.exp-freebsd-clang
Normal file
File diff suppressed because it is too large
Load Diff
5618
none/tests/amd64/sse4-64.stdout.exp.freebsd
Normal file
5618
none/tests/amd64/sse4-64.stdout.exp.freebsd
Normal file
File diff suppressed because it is too large
Load Diff
@ -18,14 +18,22 @@ void maybe_fault ( int delta )
|
||||
|
||||
void handler ( int signo )
|
||||
{
|
||||
#if defined(__FreeBSD__)
|
||||
assert(signo == SIGBUS);
|
||||
#else
|
||||
assert(signo == SIGSEGV);
|
||||
#endif
|
||||
fprintf(stderr, "three\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
int main ( void )
|
||||
{
|
||||
#if defined(__FreeBSD__)
|
||||
signal(SIGBUS, handler);
|
||||
#else
|
||||
signal(SIGSEGV, handler);
|
||||
#endif
|
||||
fprintf(stderr, "you should see: \"one\\ntwo\\nthree\\n\"\n");
|
||||
fprintf(stderr, "one\n");
|
||||
maybe_fault(0);
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
prog: ssse3_misaligned
|
||||
prereq: ../../../tests/x86_amd64_features amd64-ssse3
|
||||
prereq: ../../../tests/x86_amd64_features amd64-ssse3 && test -e ssse3_misaligned
|
||||
vgopts: -q
|
||||
|
||||
8
none/tests/async-sigs.stderr.exp-freebsd
Normal file
8
none/tests/async-sigs.stderr.exp-freebsd
Normal file
@ -0,0 +1,8 @@
|
||||
testing: blocking=0 caught=11 fatal=10... PASSED
|
||||
testing: blocking=0 caught=11 fatal=1... PASSED
|
||||
testing: blocking=0 caught=30 fatal=10... PASSED
|
||||
testing: blocking=0 caught=30 fatal=1... PASSED
|
||||
testing: blocking=1 caught=11 fatal=10... PASSED
|
||||
testing: blocking=1 caught=11 fatal=1... PASSED
|
||||
testing: blocking=1 caught=30 fatal=10... PASSED
|
||||
testing: blocking=1 caught=30 fatal=1... PASSED
|
||||
@ -1,5 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
||||
@ -14,7 +14,10 @@ int main(int argc, char **argv)
|
||||
char *const argv_exe[] = {"true", NULL};
|
||||
if (execve("/bin/true", argv_exe, NULL) < 0)
|
||||
#elif defined(VGO_darwin)
|
||||
if (execve("/usr/bin/true", NULL, NULL) < 0)
|
||||
if (execve("/usr/bin/true", NULL, NULL) < 0)
|
||||
#elif defined(VGO_freebsd)
|
||||
char *const argv_exe[] = {"true", NULL};
|
||||
if (execve("/usr/bin/true", argv_exe, NULL) < 0)
|
||||
#else
|
||||
if (execve("/bin/true", NULL, NULL) < 0)
|
||||
#endif
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
#include <setjmp.h>
|
||||
#include "tests/sys_mman.h"
|
||||
#include <unistd.h>
|
||||
#include "../../config.h"
|
||||
|
||||
/* Division by zero triggers a SIGFPE on x86 and x86_64,
|
||||
but not on the PowerPC architecture.
|
||||
@ -35,7 +36,7 @@
|
||||
* BUS_ADRERR is used for bus time out while BUS_OBJERR is translated
|
||||
* from underlying codes FC_OBJERR (x86) or ASYNC_BERR (sparc).
|
||||
*/
|
||||
#if defined(VGO_solaris)
|
||||
#if defined(VGO_solaris) || (defined(VGO_freebsd) && (FREEBSD_VERS >= FREEBSD_12_2))
|
||||
# define BUS_ERROR_SI_CODE BUS_OBJERR
|
||||
#else
|
||||
# define BUS_ERROR_SI_CODE BUS_ADRERR
|
||||
@ -166,7 +167,11 @@ int main()
|
||||
#define T(n, sig, code, addr) { test##n, sig, code, addr }
|
||||
T(1, SIGSEGV, SEGV_MAPERR, BADADDR),
|
||||
T(2, SIGSEGV, SEGV_ACCERR, mapping),
|
||||
#if defined(VGO_freebsd) && (FREEBSD_VERS < FREEBSD_12_2)
|
||||
T(3, SIGSEGV, BUS_ERROR_SI_CODE, &mapping[FILESIZE+10]),
|
||||
#else
|
||||
T(3, SIGBUS, BUS_ERROR_SI_CODE, &mapping[FILESIZE+10]),
|
||||
#endif
|
||||
T(4, SIGFPE, DIVISION_BY_ZERO_SI_CODE, 0),
|
||||
#undef T
|
||||
};
|
||||
|
||||
@ -28,6 +28,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include "fdleak.h"
|
||||
#include <sys/uio.h>
|
||||
|
||||
char filea[24];
|
||||
char fileb[24];
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <unistd.h>
|
||||
#include "fdleak.h"
|
||||
|
||||
26
none/tests/freebsd/Makefile.am
Normal file
26
none/tests/freebsd/Makefile.am
Normal file
@ -0,0 +1,26 @@
|
||||
|
||||
include $(top_srcdir)/Makefile.tool-tests.am
|
||||
|
||||
dist_noinst_SCRIPTS = filter_stderr
|
||||
EXTRA_DIST = \
|
||||
auxv.vgtest \
|
||||
auxv.stderr.exp \
|
||||
auxv.stderr.exp-32on64 \
|
||||
auxv.stderr.exp-freebsd13 \
|
||||
osrel.vgtest \
|
||||
osrel.stderr.exp \
|
||||
osrel.stdout.exp \
|
||||
swapcontext.vgtest \
|
||||
swapcontext.stderr.exp \
|
||||
swapcontext.stdout.exp
|
||||
|
||||
check_PROGRAMS = \
|
||||
auxv osrel swapcontext
|
||||
|
||||
AM_CFLAGS += $(AM_FLAG_M3264_PRI)
|
||||
AM_CXXFLAGS += $(AM_FLAG_M3264_PRI)
|
||||
|
||||
auxv_CFLAGS = ${AM_CFLAGS}
|
||||
osrel_CFLAGS = ${AM_CFLAGS}
|
||||
swapcontext_CFLAGS = ${AM_CFLAGS}
|
||||
|
||||
69
none/tests/freebsd/auxv.c
Normal file
69
none/tests/freebsd/auxv.c
Normal file
@ -0,0 +1,69 @@
|
||||
#include <stdio.h>
|
||||
#include <elf.h>
|
||||
#include "../../../config.h"
|
||||
|
||||
/* /usr/include/x86/elf.h AT_* defs */
|
||||
|
||||
typedef struct {
|
||||
const char *str_val;
|
||||
int type;
|
||||
} Elf_AuxStr;
|
||||
|
||||
Elf_AuxStr aux_map[AT_COUNT] = {
|
||||
{"AT_NLL", 0},
|
||||
{"AT_IGNORE", 1},
|
||||
{"AT_EXECFD", 2},
|
||||
{"AT_PHDR", 3},
|
||||
{"AT_PHENT", 4},
|
||||
{"AT_PHNUM", 5},
|
||||
{"AT_PAGESZ", 6},
|
||||
{"AT_BASE", 7},
|
||||
{"AT_FLAGS", 8},
|
||||
{"AT_ENTRY", 9},
|
||||
{"AT_NOTELF", 10},
|
||||
{"AT_UID", 11},
|
||||
{"AT_EUID", 12},
|
||||
{"AT_GID", 13},
|
||||
{"AT_EGID", 14},
|
||||
{"AT_EXECPATH", 15},
|
||||
{"AT_CANARY", 16},
|
||||
{"AT_CANARYLEN", 17},
|
||||
{"AT_OSRELDATE", 18},
|
||||
{"AT_NCPUS", 19},
|
||||
{"AT_PAGESIZES", 20},
|
||||
{"AT_PAGESIZESLEN", 21},
|
||||
{"AT_TIMEKEEP", 22},
|
||||
{"AT_STACKPROT", 23},
|
||||
{"AT_EHDRFLAGS", 24},
|
||||
{"AT_HWCAP", 25},
|
||||
{"AT_HWCAP2", 26},
|
||||
// FreeBSD 12 and 11
|
||||
// {"AT_COUNT", 27},
|
||||
#if (FREEBSD_VERS >= FREEBSD_13)
|
||||
{"AT_BSDFLAGS", 27},
|
||||
{"AT_ARGC", 28},
|
||||
{"AT_ARGV", 29},
|
||||
{"AT_ENVC", 30},
|
||||
{"AT_ENVV", 31},
|
||||
{"AT_PS_STRINGS", 32},
|
||||
// {"AT_COUNT", 33},
|
||||
#endif
|
||||
#if (FREEBSD_VERS >= FREEBSD_14)
|
||||
{"AT_FXRNG", 33},
|
||||
// {"AT_COUNT", 34},
|
||||
#endif
|
||||
};
|
||||
|
||||
int main(int argc, char* argv[], char* envp[])
|
||||
{
|
||||
Elf_Auxinfo *auxp;
|
||||
Elf_AuxStr *aux_str;
|
||||
while(*envp++ != NULL)
|
||||
;
|
||||
|
||||
for (auxp = (Elf_Auxinfo *)envp; auxp->a_type != AT_NULL; auxp++)
|
||||
{
|
||||
aux_str = &aux_map[auxp->a_type];
|
||||
fprintf(stderr, "val: %s int: %02d ptr: 0x%lx\n", aux_str->str_val, aux_str->type, auxp->a_un.a_val);
|
||||
}
|
||||
}
|
||||
17
none/tests/freebsd/auxv.stderr.exp
Normal file
17
none/tests/freebsd/auxv.stderr.exp
Normal file
@ -0,0 +1,17 @@
|
||||
val: AT_PHDR int: 03 ptr: 0x........
|
||||
val: AT_PHENT int: 04 ptr: 0x........
|
||||
val: AT_PHNUM int: 05 ptr: 0x........
|
||||
val: AT_PAGESZ int: 06 ptr: 0x........
|
||||
val: AT_FLAGS int: 08 ptr: 0x........
|
||||
val: AT_ENTRY int: 09 ptr: 0x........
|
||||
val: AT_BASE int: 07 ptr: 0x........
|
||||
val: AT_EHDRFLAGS int: 24 ptr: 0x........
|
||||
val: AT_IGNORE int: 01 ptr: 0x........
|
||||
val: AT_OSRELDATE int: 18 ptr: 0x........
|
||||
val: AT_IGNORE int: 01 ptr: 0x........
|
||||
val: AT_IGNORE int: 01 ptr: 0x........
|
||||
val: AT_NCPUS int: 19 ptr: 0x........
|
||||
val: AT_IGNORE int: 01 ptr: 0x........
|
||||
val: AT_IGNORE int: 01 ptr: 0x........
|
||||
val: AT_IGNORE int: 01 ptr: 0x........
|
||||
val: AT_STACKPROT int: 23 ptr: 0x........
|
||||
17
none/tests/freebsd/auxv.stderr.exp-32on64
Normal file
17
none/tests/freebsd/auxv.stderr.exp-32on64
Normal file
@ -0,0 +1,17 @@
|
||||
val: AT_PHDR int: 03 ptr: 0x........
|
||||
val: AT_PHENT int: 04 ptr: 0x........
|
||||
val: AT_PHNUM int: 05 ptr: 0x........
|
||||
val: AT_PAGESZ int: 06 ptr: 0x........
|
||||
val: AT_FLAGS int: 08 ptr: 0x........
|
||||
val: AT_ENTRY int: 09 ptr: 0x........
|
||||
val: AT_BASE int: 07 ptr: 0x........
|
||||
val: AT_EHDRFLAGS int: 24 ptr: 0x........
|
||||
val: AT_IGNORE int: 01 ptr: 0x........
|
||||
val: AT_OSRELDATE int: 18 ptr: 0x........
|
||||
val: AT_IGNORE int: 01 ptr: 0x........
|
||||
val: AT_IGNORE int: 01 ptr: 0x........
|
||||
val: AT_NCPUS int: 19 ptr: 0x........
|
||||
val: AT_PAGESIZES int: 20 ptr: 0x........
|
||||
val: AT_PAGESIZESLEN int: 21 ptr: 0x........
|
||||
val: AT_IGNORE int: 01 ptr: 0x........
|
||||
val: AT_STACKPROT int: 23 ptr: 0x........
|
||||
23
none/tests/freebsd/auxv.stderr.exp-freebsd13
Normal file
23
none/tests/freebsd/auxv.stderr.exp-freebsd13
Normal file
@ -0,0 +1,23 @@
|
||||
val: AT_PHDR int: 03 ptr: 0x........
|
||||
val: AT_PHENT int: 04 ptr: 0x........
|
||||
val: AT_PHNUM int: 05 ptr: 0x........
|
||||
val: AT_PAGESZ int: 06 ptr: 0x........
|
||||
val: AT_FLAGS int: 08 ptr: 0x........
|
||||
val: AT_ENTRY int: 09 ptr: 0x........
|
||||
val: AT_BASE int: 07 ptr: 0x........
|
||||
val: AT_EHDRFLAGS int: 24 ptr: 0x........
|
||||
val: AT_IGNORE int: 01 ptr: 0x........
|
||||
val: AT_OSRELDATE int: 18 ptr: 0x........
|
||||
val: AT_IGNORE int: 01 ptr: 0x........
|
||||
val: AT_IGNORE int: 01 ptr: 0x........
|
||||
val: AT_NCPUS int: 19 ptr: 0x........
|
||||
val: AT_IGNORE int: 01 ptr: 0x........
|
||||
val: AT_IGNORE int: 01 ptr: 0x........
|
||||
val: AT_IGNORE int: 01 ptr: 0x........
|
||||
val: AT_STACKPROT int: 23 ptr: 0x........
|
||||
val: AT_BSDFLAGS int: 27 ptr: 0x........
|
||||
val: AT_ARGC int: 28 ptr: 0x........
|
||||
val: AT_IGNORE int: 01 ptr: 0x........
|
||||
val: AT_ENVC int: 30 ptr: 0x........
|
||||
val: AT_IGNORE int: 01 ptr: 0x........
|
||||
val: AT_IGNORE int: 01 ptr: 0x........
|
||||
3
none/tests/freebsd/auxv.vgtest
Normal file
3
none/tests/freebsd/auxv.vgtest
Normal file
@ -0,0 +1,3 @@
|
||||
prog: auxv
|
||||
vgopts: -q
|
||||
|
||||
3
none/tests/freebsd/filter_stderr
Executable file
3
none/tests/freebsd/filter_stderr
Executable file
@ -0,0 +1,3 @@
|
||||
#! /bin/sh
|
||||
|
||||
../filter_stderr "$@"
|
||||
31
none/tests/freebsd/osrel.c
Normal file
31
none/tests/freebsd/osrel.c
Normal file
@ -0,0 +1,31 @@
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/param.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
u_int32_t osrel;
|
||||
int name[4];
|
||||
name[0] = CTL_KERN;
|
||||
name[1] = KERN_PROC;
|
||||
name[2] = KERN_PROC_OSREL;
|
||||
name[3] = getpid();
|
||||
size_t newlen = sizeof(osrel);
|
||||
sysctl(name, 4, &osrel, &newlen, NULL, 0U);
|
||||
|
||||
// this doesn't change much for each release
|
||||
u_int32_t shortProcOsrel = osrel/1000;
|
||||
// this changes with each patch, see https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/versions.html
|
||||
u_int32_t shortSysparamOsrel = __FreeBSD_version/1000;
|
||||
|
||||
if (shortProcOsrel == shortSysparamOsrel)
|
||||
{
|
||||
printf("OK osrel values match\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("FAIL osrel values different (kernel proc %u compiler %u)\n", shortProcOsrel, shortSysparamOsrel);
|
||||
}
|
||||
}
|
||||
0
none/tests/freebsd/osrel.stderr.exp
Normal file
0
none/tests/freebsd/osrel.stderr.exp
Normal file
1
none/tests/freebsd/osrel.stdout.exp
Normal file
1
none/tests/freebsd/osrel.stdout.exp
Normal file
@ -0,0 +1 @@
|
||||
OK osrel values match
|
||||
3
none/tests/freebsd/osrel.vgtest
Normal file
3
none/tests/freebsd/osrel.vgtest
Normal file
@ -0,0 +1,3 @@
|
||||
prog: osrel
|
||||
vgopts: -q
|
||||
|
||||
60
none/tests/freebsd/swapcontext.c
Normal file
60
none/tests/freebsd/swapcontext.c
Normal file
@ -0,0 +1,60 @@
|
||||
// obtained from https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.bpxbd00/rswctx.htm
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <ucontext.h>
|
||||
#include <errno.h>
|
||||
|
||||
#define STACK_SIZE 2097152+16384 /* large enough value for AMODE 64 */
|
||||
|
||||
ucontext_t fcontext,mcontext;
|
||||
int x = 0;
|
||||
|
||||
void func(int arg)
|
||||
{
|
||||
printf("function called with value %d\n",arg);
|
||||
x++;
|
||||
printf("function returning to main\n");
|
||||
setcontext(&mcontext);
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int value = 1;
|
||||
|
||||
getcontext(&fcontext);
|
||||
if ((fcontext.uc_stack.ss_sp = (char *) malloc(STACK_SIZE)) != NULL)
|
||||
{
|
||||
fcontext.uc_stack.ss_size = STACK_SIZE;
|
||||
fcontext.uc_stack.ss_flags = 0;
|
||||
fcontext.uc_sigmask.__bits[3] = -1;
|
||||
errno = 0;
|
||||
makecontext(&fcontext,(void (*)(void))func,1,value);
|
||||
if (errno != 0)
|
||||
{
|
||||
perror("Error reported by makecontext()");
|
||||
return -1; /* Error occurred exit */
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
perror("not enough storage for stack");
|
||||
abort();
|
||||
}
|
||||
|
||||
printf("context has been built\n");
|
||||
swapcontext(&mcontext,&fcontext);
|
||||
|
||||
if (!x)
|
||||
{
|
||||
perror("incorrect return from swapcontext");
|
||||
abort();
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("returned from function\n");
|
||||
}
|
||||
free(fcontext.uc_stack.ss_sp);
|
||||
}
|
||||
|
||||
|
||||
0
none/tests/freebsd/swapcontext.stderr.exp
Normal file
0
none/tests/freebsd/swapcontext.stderr.exp
Normal file
4
none/tests/freebsd/swapcontext.stdout.exp
Normal file
4
none/tests/freebsd/swapcontext.stdout.exp
Normal file
@ -0,0 +1,4 @@
|
||||
context has been built
|
||||
function called with value 1
|
||||
function returning to main
|
||||
returned from function
|
||||
3
none/tests/freebsd/swapcontext.vgtest
Normal file
3
none/tests/freebsd/swapcontext.vgtest
Normal file
@ -0,0 +1,3 @@
|
||||
prog: swapcontext
|
||||
vgopts: -q
|
||||
|
||||
@ -11,6 +11,8 @@
|
||||
is not == 0 everywhere. */
|
||||
# if defined(VGO_linux)
|
||||
#define IOCTL_REQUEST_BASE (0x12345670 | _IOC(_IOC_NONE,0,0,0))
|
||||
# elif defined(VGO_freebsd)
|
||||
#define IOCTL_REQUEST_BASE (0x12345670 | _IO(0,0))
|
||||
# else
|
||||
#define IOCTL_REQUEST_BASE 0x12345670
|
||||
# endif
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
#include <sys/types.h>
|
||||
#include <config.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
@ -5,7 +6,7 @@
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#ifdef HAVE_MQUEUE_H
|
||||
#if defined(HAVE_MQUEUE_H)
|
||||
|
||||
#include <mqueue.h>
|
||||
|
||||
|
||||
3
none/tests/nocwd.stderr.exp-freebsd
Normal file
3
none/tests/nocwd.stderr.exp-freebsd
Normal file
@ -0,0 +1,3 @@
|
||||
WARNING: Valgrind may not operate correctly in capability mode.
|
||||
Please consider disabling capability by using the RUNNING_ON_VALGRIND mechanism.
|
||||
See http://valgrind.org/docs/manual/manual-core-adv.html#manual-core-adv.clientreq
|
||||
@ -1,3 +1,7 @@
|
||||
prog: nocwd
|
||||
vgopts: -q --trace-children=yes
|
||||
cleanup: chmod u+rwx /tmp/wd_test_*; rm -rf /tmp/wd_test_*
|
||||
|
||||
# on FreeBSD, capsicum stops us from removing the gdb pipes left over in /tmp
|
||||
# Don't really want to do an "rm /tmp/vgdb-pipe*" in case another instance
|
||||
# is running
|
||||
|
||||
1
none/tests/nodir.stderr.exp-freebsd
Normal file
1
none/tests/nodir.stderr.exp-freebsd
Normal file
@ -0,0 +1 @@
|
||||
valgrind: ./nodir.vgtest/foobar: Permission denied
|
||||
@ -1,4 +1,4 @@
|
||||
prereq: ../../tests/os_test linux || ../../tests/os_test solaris
|
||||
prereq: ../../tests/os_test linux || ../../tests/os_test solaris || ../../tests/os_test freebsd
|
||||
prog: ppoll_alarm
|
||||
vgopts: -q
|
||||
stderr_filter: filter_stderr
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# For Linux, there is 'procfs-linux'.
|
||||
# For Solaris, there is Solaris-specific 'solaris/proc-cmdline-exe'.
|
||||
#
|
||||
prereq: ! ../../tests/os_test linux && ! ../../tests/os_test solaris
|
||||
prereq: ! ../../tests/os_test linux && ! ../../tests/os_test solaris && ! ../../tests/os_test freebsd
|
||||
prog: procfs-cmdline-exe
|
||||
stderr_filter: filter_stderr
|
||||
|
||||
9
none/tests/require-text-symbol-2.stderr.exp-freebsd
Executable file
9
none/tests/require-text-symbol-2.stderr.exp-freebsd
Executable file
@ -0,0 +1,9 @@
|
||||
|
||||
valgrind: Fatal error at when loading library with soname
|
||||
valgrind: libc.so.7
|
||||
valgrind: Cannot find any text symbol with a name that matches the pattern
|
||||
valgrind: doesntexist
|
||||
valgrind: as required by a --require-text-symbol= specification.
|
||||
|
||||
valgrind: Cannot continue -- exiting now.
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/in.h>
|
||||
#include <resolv.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@ -2,9 +2,11 @@
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#include <unistd.h>
|
||||
#include "fdleak.h"
|
||||
#include "config.h"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
@ -20,12 +22,22 @@ int main(int argc, char **argv)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
int expected_errno;
|
||||
#if defined(VGO_freebsd)
|
||||
expected_errno = EPERM;
|
||||
#else
|
||||
expected_errno = EINVAL;
|
||||
#endif
|
||||
newrlim.rlim_cur = oldrlim.rlim_max+1;
|
||||
newrlim.rlim_max = oldrlim.rlim_max;
|
||||
if (setrlimit(RLIMIT_NOFILE, &newrlim) == -1)
|
||||
{
|
||||
if (errno != EINVAL) {
|
||||
if (errno != expected_errno) {
|
||||
#if defined(VGO_freebsd)
|
||||
fprintf(stderr, "setrlimit exceeding hardlimit must set errno=EPERM\n");
|
||||
#else
|
||||
fprintf(stderr, "setrlimit exceeding hardlimit must set errno=EINVAL\n");
|
||||
#endif
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,11 +9,12 @@ dist_noinst_SCRIPTS = \
|
||||
EXTRA_DIST = \
|
||||
say-hello.helper \
|
||||
bug231357.vgtest bug231357.stderr.exp bug231357.stdout.exp \
|
||||
bug231357.stderr.exp-freebsd \
|
||||
bug338606 bug338606.vgtest bug338606.stderr.exp \
|
||||
shell shell.vgtest shell.stderr.exp \
|
||||
shell.stderr.exp-dash shell.stderr.exp-dash2 shell.stderr.exp-dash3 \
|
||||
shell.stderr.exp-dash4 \
|
||||
shell.stdout.exp shell.stderr.exp-illumos \
|
||||
shell.stdout.exp shell.stderr.exp-illumos shell.stderr.exp-freebsd \
|
||||
shell.stderr.exp-solaris shell.stderr.exp-solaris-spawn \
|
||||
shell_badinterp shell_badinterp.vgtest shell_badinterp.stderr.exp \
|
||||
shell_binaryfile shell_binaryfile.vgtest shell_binaryfile.stderr.exp \
|
||||
|
||||
3
none/tests/scripts/bug231357.stderr.exp-freebsd
Normal file
3
none/tests/scripts/bug231357.stderr.exp-freebsd
Normal file
@ -0,0 +1,3 @@
|
||||
WARNING: Valgrind may not operate correctly in capability mode.
|
||||
Please consider disabling capability by using the RUNNING_ON_VALGRIND mechanism.
|
||||
See http://valgrind.org/docs/manual/manual-core-adv.html#manual-core-adv.clientreq
|
||||
8
none/tests/scripts/shell.stderr.exp-freebsd
Normal file
8
none/tests/scripts/shell.stderr.exp-freebsd
Normal file
@ -0,0 +1,8 @@
|
||||
./shell: ./x86/: Permission denied
|
||||
./shell: ./shell.vgtest: Permission denied
|
||||
execve(0x........(./shell_badinterp), 0x........, 0x........) failed, errno 2
|
||||
EXEC FAILED: I can't recover from execve() failing, so I'm dying.
|
||||
Add more stringent tests in PRE(sys_execve), or work out how to recover.
|
||||
./shell: ./shell_binaryfile: Exec format error
|
||||
./shell: ./shell_nosuchfile: not found
|
||||
./shell: shell_nosuchfile: not found
|
||||
@ -4,6 +4,7 @@
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/sem.h>
|
||||
#include <time.h>
|
||||
|
||||
@ -48,7 +48,9 @@ int main()
|
||||
deep = &here - SIZE;
|
||||
|
||||
sa.sa_handler = handler;
|
||||
#if defined(SA_NODEFER)
|
||||
sa.sa_flags = SA_NODEFER;
|
||||
#endif
|
||||
sigemptyset(&sa.sa_mask);
|
||||
|
||||
sigaction(SIGUSR1, &sa, NULL);
|
||||
|
||||
@ -5,10 +5,8 @@ dist_noinst_SCRIPTS = filter_cpuid filter_inf_nan filter_stderr gen_insn_test.pl
|
||||
|
||||
CLEANFILES = $(addsuffix .c,$(INSN_TESTS))
|
||||
|
||||
INSN_TESTS = insn_basic insn_cmov insn_mmx insn_mmxext
|
||||
INSN_TESTS = insn_basic insn_cmov insn_mmx insn_mmxext insn_sse insn_sse2
|
||||
|
||||
if !COMPILER_IS_CLANG
|
||||
INSN_TESTS += insn_sse insn_sse2
|
||||
if BUILD_SSSE3_TESTS
|
||||
INSN_TESTS += insn_ssse3
|
||||
endif
|
||||
@ -18,7 +16,6 @@ if !SOLARIS_SUN_STUDIO_AS
|
||||
INSN_TESTS += insn_sse3
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
if !SOLARIS_SUN_STUDIO_AS
|
||||
# Sun Studio assembler fails to build some tests (illegal mnemonic).
|
||||
|
||||
@ -21,7 +21,7 @@ static const struct test *cur_test;
|
||||
|
||||
|
||||
|
||||
static jmp_buf escape;
|
||||
static sigjmp_buf escape;
|
||||
|
||||
#define BADADDR ((int *)0x1234)
|
||||
|
||||
@ -133,7 +133,6 @@ int main()
|
||||
const struct test tests[] = {
|
||||
#define T(n, sig, code, addr) { test##n, sig, code, addr }
|
||||
T(1, SIGILL, ILL_ILLOPN, &test1_ill),
|
||||
|
||||
T(2, SIGTRAP, 128, 0), /* TRAP_BRKPT? */
|
||||
T(3, SIGSEGV, 128, 0),
|
||||
T(4, SIGSEGV, 128, 0),
|
||||
|
||||
@ -135,6 +135,8 @@ typedef union {
|
||||
|
||||
static sigjmp_buf catchpoint;
|
||||
|
||||
static char state[108];
|
||||
|
||||
static void handle_sigill(int signum)
|
||||
{
|
||||
siglongjmp(catchpoint, 1);
|
||||
@ -634,7 +636,6 @@ while (<>)
|
||||
|
||||
my $stateargnum = $argnum++;
|
||||
|
||||
print qq| char state\[108\];\n|;
|
||||
print qq|\n|;
|
||||
print qq| if (sigsetjmp(catchpoint, 1) == 0)\n|;
|
||||
print qq| \{\n|;
|
||||
|
||||
@ -218,6 +218,12 @@ static inline void my_exit ( int x )
|
||||
STRRCHR(NONE, __dl_strrchr); /* in /system/bin/linker */
|
||||
#endif
|
||||
|
||||
#elif defined(VGO_freebsd)
|
||||
STRRCHR(VG_Z_LIBC_SONAME, strrchr)
|
||||
STRRCHR(VG_Z_LIBC_SONAME, rindex)
|
||||
STRRCHR(VG_Z_LD_ELF_SO_1, strrchr)
|
||||
STRRCHR(VG_Z_LD_ELF32_SO_1, strrchr)
|
||||
|
||||
#elif defined(VGO_darwin)
|
||||
//STRRCHR(VG_Z_LIBC_SONAME, strrchr)
|
||||
//STRRCHR(VG_Z_LIBC_SONAME, rindex)
|
||||
@ -269,6 +275,12 @@ static inline void my_exit ( int x )
|
||||
STRCHR(NONE, __dl_strchr)
|
||||
#endif
|
||||
|
||||
#elif defined(VGO_freebsd)
|
||||
STRCHR(VG_Z_LIBC_SONAME, strchr)
|
||||
STRCHR(VG_Z_LIBC_SONAME, index)
|
||||
STRCHR(VG_Z_LD_ELF_SO_1, strchr)
|
||||
STRCHR(VG_Z_LD_ELF32_SO_1, strchr)
|
||||
|
||||
#elif defined(VGO_darwin)
|
||||
STRCHR(VG_Z_LIBC_SONAME, strchr)
|
||||
# if DARWIN_VERS == DARWIN_10_9
|
||||
@ -318,6 +330,11 @@ static inline void my_exit ( int x )
|
||||
STRCAT(VG_Z_LIBC_SONAME, strcat)
|
||||
STRCAT(VG_Z_LIBC_SONAME, __GI_strcat)
|
||||
|
||||
#elif defined(VGO_freebsd)
|
||||
STRCAT(VG_Z_LIBC_SONAME, strcat)
|
||||
STRCAT(VG_Z_LD_ELF_SO_1, strcat)
|
||||
STRCAT(VG_Z_LD_ELF32_SO_1, strcat)
|
||||
|
||||
#elif defined(VGO_darwin)
|
||||
//STRCAT(VG_Z_LIBC_SONAME, strcat)
|
||||
|
||||
@ -358,6 +375,9 @@ static inline void my_exit ( int x )
|
||||
#if defined(VGO_linux)
|
||||
STRNCAT(VG_Z_LIBC_SONAME, strncat)
|
||||
|
||||
#elif defined(VGO_freebsd)
|
||||
STRNCAT(VG_Z_LIBC_SONAME, strncat)
|
||||
|
||||
#elif defined(VGO_darwin)
|
||||
//STRNCAT(VG_Z_LIBC_SONAME, strncat)
|
||||
//STRNCAT(VG_Z_DYLD, strncat)
|
||||
@ -408,6 +428,11 @@ static inline void my_exit ( int x )
|
||||
|
||||
#if defined(VGO_linux)
|
||||
|
||||
#elif defined(VGO_freebsd)
|
||||
STRLCAT(VG_Z_LD_ELF_SO_1, strlcat)
|
||||
STRLCAT(VG_Z_LIBC_SONAME, strlcat)
|
||||
STRLCAT(VG_Z_LD_ELF32_SO_1, strlcat)
|
||||
|
||||
#elif defined(VGO_darwin)
|
||||
//STRLCAT(VG_Z_LIBC_SONAME, strlcat)
|
||||
//STRLCAT(VG_Z_DYLD, strlcat)
|
||||
@ -479,6 +504,11 @@ static inline void my_exit ( int x )
|
||||
STRLEN(NONE, __dl_strlen); /* in /system/bin/linker */
|
||||
# endif
|
||||
|
||||
#elif defined(VGO_freebsd)
|
||||
STRLEN(VG_Z_LIBC_SONAME, strlen)
|
||||
STRLEN(VG_Z_LD_ELF_SO_1, strlen)
|
||||
STRLEN(VG_Z_LD_ELF32_SO_1, strlen)
|
||||
|
||||
#elif defined(VGO_darwin)
|
||||
STRLEN(VG_Z_LIBC_SONAME, strlen)
|
||||
# if DARWIN_VERS >= DARWIN_10_9
|
||||
@ -523,6 +553,11 @@ static inline void my_exit ( int x )
|
||||
STRCPY(VG_Z_LIBC_SONAME, strcpy)
|
||||
STRCPY(VG_Z_LIBC_SONAME, __GI_strcpy)
|
||||
|
||||
#elif defined(VGO_freebsd)
|
||||
STRCPY(VG_Z_LIBC_SONAME, strcpy)
|
||||
STRCPY(VG_Z_LD_ELF_SO_1, strcpy)
|
||||
STRCPY(VG_Z_LD_ELF32_SO_1, strcpy)
|
||||
|
||||
#elif defined(VGO_darwin)
|
||||
STRCPY(VG_Z_LIBC_SONAME, strcpy)
|
||||
# if DARWIN_VERS == DARWIN_10_9
|
||||
@ -566,6 +601,11 @@ static inline void my_exit ( int x )
|
||||
STRNCPY(VG_Z_LIBC_SONAME, __strncpy_sse2)
|
||||
STRNCPY(VG_Z_LIBC_SONAME, __strncpy_sse2_unaligned)
|
||||
|
||||
#elif defined(VGO_freebsd)
|
||||
STRNCPY(VG_Z_LIBC_SONAME, strncpy)
|
||||
STRNCPY(VG_Z_LD_ELF_SO_1, strncpy)
|
||||
STRNCPY(VG_Z_LD_ELF32_SO_1, strncpy)
|
||||
|
||||
#elif defined(VGO_darwin)
|
||||
STRNCPY(VG_Z_LIBC_SONAME, strncpy)
|
||||
# if DARWIN_VERS >= DARWIN_10_9
|
||||
@ -618,6 +658,12 @@ static inline void my_exit ( int x )
|
||||
STRLCPY(VG_Z_LIBC_SONAME, strlcpy);
|
||||
#endif
|
||||
|
||||
#elif defined(VGO_freebsd)
|
||||
#define STRLCPY_CHECK_FOR_DSTSIZE_ZERO
|
||||
STRLCPY(VG_Z_LD_ELF_SO_1, strlcpy)
|
||||
STRLCPY(VG_Z_LD_ELF32_SO_1, strlcpy)
|
||||
STRLCPY(VG_Z_LIBC_SONAME, strlcpy)
|
||||
|
||||
#elif defined(VGO_darwin)
|
||||
#define STRLCPY_CHECK_FOR_DSTSIZE_ZERO
|
||||
//STRLCPY(VG_Z_LIBC_SONAME, strlcpy)
|
||||
@ -665,6 +711,11 @@ static inline void my_exit ( int x )
|
||||
STRNCMP(VG_Z_LIBC_SONAME, __strncmp_sse2)
|
||||
STRNCMP(VG_Z_LIBC_SONAME, __strncmp_sse42)
|
||||
|
||||
#elif defined(VGO_freebsd)
|
||||
STRNCMP(VG_Z_LIBC_SONAME, strncmp)
|
||||
STRNCMP(VG_Z_LD_ELF_SO_1, strncmp)
|
||||
STRNCMP(VG_Z_LD_ELF32_SO_1, strncmp)
|
||||
|
||||
#elif defined(VGO_darwin)
|
||||
STRNCMP(VG_Z_LIBC_SONAME, strncmp)
|
||||
# if DARWIN_VERS >= DARWIN_10_9
|
||||
@ -709,6 +760,11 @@ static inline void my_exit ( int x )
|
||||
STRCASECMP(VG_Z_LIBC_SONAME, __GI_strcasecmp)
|
||||
# endif
|
||||
|
||||
#elif defined(VGO_freebsd)
|
||||
STRCASECMP(VG_Z_LIBC_SONAME, strcasecmp)
|
||||
STRNCMP(VG_Z_LD_ELF_SO_1, strcasecmp)
|
||||
STRNCMP(VG_Z_LD_ELF32_SO_1, strcasecmp)
|
||||
|
||||
#elif defined(VGO_darwin)
|
||||
//STRCASECMP(VG_Z_LIBC_SONAME, strcasecmp)
|
||||
|
||||
@ -752,6 +808,11 @@ static inline void my_exit ( int x )
|
||||
STRNCASECMP(VG_Z_LIBC_SONAME, __GI_strncasecmp)
|
||||
# endif
|
||||
|
||||
#elif defined(VGO_freebsd)
|
||||
STRNCASECMP(VG_Z_LIBC_SONAME, strncasecmp)
|
||||
STRNCASECMP(VG_Z_LD_ELF_SO_1, strncasecmp)
|
||||
STRNCASECMP(VG_Z_LD_ELF32_SO_1, strncasecmp)
|
||||
|
||||
#elif defined(VGO_darwin)
|
||||
//STRNCASECMP(VG_Z_LIBC_SONAME, strncasecmp)
|
||||
//STRNCASECMP(VG_Z_DYLD, strncasecmp)
|
||||
@ -871,6 +932,11 @@ static inline void my_exit ( int x )
|
||||
STRCMP(NONE, __dl_strcmp); /* in /system/bin/linker */
|
||||
# endif
|
||||
|
||||
#elif defined(VGO_freebsd)
|
||||
STRCMP(VG_Z_LIBC_SONAME, strcmp)
|
||||
STRCMP(VG_Z_LD_ELF_SO_1, strcmp)
|
||||
STRCMP(VG_Z_LD_ELF32_SO_1, strcmp)
|
||||
|
||||
#elif defined(VGO_darwin)
|
||||
STRCMP(VG_Z_LIBC_SONAME, strcmp)
|
||||
# if DARWIN_VERS >= DARWIN_10_9
|
||||
@ -942,6 +1008,9 @@ static inline void my_exit ( int x )
|
||||
#if defined(VGO_linux)
|
||||
MEMRCHR(VG_Z_LIBC_SONAME, memrchr)
|
||||
|
||||
#elif defined(VGO_freebsd)
|
||||
MEMRCHR(VG_Z_LIBC_SONAME, memrchr)
|
||||
|
||||
#elif defined(VGO_darwin)
|
||||
//MEMRCHR(VG_Z_LIBC_SONAME, memrchr)
|
||||
//MEMRCHR(VG_Z_DYLD, memrchr)
|
||||
@ -1064,6 +1133,11 @@ static inline void my_exit ( int x )
|
||||
*/
|
||||
MEMCPY(NONE, ZuintelZufastZumemcpy)
|
||||
|
||||
#elif defined(VGO_freebsd)
|
||||
MEMCPY(VG_Z_LIBC_SONAME, memcpy)
|
||||
MEMCPY(VG_Z_LD_ELF_SO_1, memcpy)
|
||||
MEMCPY(VG_Z_LD_ELF32_SO_1, memcpy)
|
||||
|
||||
#elif defined(VGO_darwin)
|
||||
# if DARWIN_VERS <= DARWIN_10_6
|
||||
MEMCPY(VG_Z_LIBC_SONAME, memcpy)
|
||||
@ -1129,6 +1203,10 @@ static inline void my_exit ( int x )
|
||||
MEMCMP(VG_Z_LIBC_SONAME, bcmp)
|
||||
MEMCMP(VG_Z_LD_SO_1, bcmp)
|
||||
|
||||
#elif defined(VGO_freebsd)
|
||||
MEMCMP(VG_Z_LIBC_SONAME, memcmp)
|
||||
MEMCMP(VG_Z_LIBC_SONAME, bcmp)
|
||||
|
||||
#elif defined(VGO_darwin)
|
||||
# if DARWIN_VERS >= DARWIN_10_9
|
||||
MEMCMP(libsystemZuplatformZddylib, _platform_memcmp)
|
||||
@ -1180,6 +1258,16 @@ static inline void my_exit ( int x )
|
||||
STPCPY(VG_Z_LD_LINUX_X86_64_SO_2, stpcpy)
|
||||
STPCPY(VG_Z_LD_LINUX_AARCH64_SO_1,stpcpy)
|
||||
|
||||
#elif defined(VGO_freebsd)
|
||||
STPCPY(VG_Z_LD_ELF_SO_1, stpcpy)
|
||||
STPCPY(VG_Z_LD_ELF32_SO_1, stpcpy)
|
||||
STPCPY(VG_Z_LIBC_SONAME, stpcpy)
|
||||
|
||||
#elif defined(VGO_freebsd)
|
||||
STPCPY(VG_Z_LD_ELF_SO_1, stpcpy)
|
||||
STPCPY(VG_Z_LD_ELF32_SO_1, stpcpy)
|
||||
STPCPY(VG_Z_LIBC_SONAME, stpcpy)
|
||||
|
||||
#elif defined(VGO_darwin)
|
||||
//STPCPY(VG_Z_LIBC_SONAME, stpcpy)
|
||||
//STPCPY(VG_Z_DYLD, stpcpy)
|
||||
@ -1215,7 +1303,7 @@ static inline void my_exit ( int x )
|
||||
return dst_str; \
|
||||
}
|
||||
|
||||
#if defined(VGO_linux)
|
||||
#if defined(VGO_linux) || defined(VGO_freebsd)
|
||||
STPNCPY(VG_Z_LIBC_SONAME, stpncpy)
|
||||
#endif
|
||||
|
||||
@ -1269,6 +1357,11 @@ static inline void my_exit ( int x )
|
||||
#if defined(VGO_linux)
|
||||
MEMSET(VG_Z_LIBC_SONAME, memset)
|
||||
|
||||
#elif defined(VGO_freebsd)
|
||||
MEMSET(VG_Z_LIBC_SONAME, memset)
|
||||
MEMSET(VG_Z_LD_ELF_SO_1, memset)
|
||||
MEMSET(VG_Z_LD_ELF32_SO_1, memset)
|
||||
|
||||
#elif defined(VGO_darwin)
|
||||
//MEMSET(VG_Z_LIBC_SONAME, memset)
|
||||
//MEMSET(VG_Z_DYLD, memset)
|
||||
@ -1293,6 +1386,11 @@ static inline void my_exit ( int x )
|
||||
to call memcpy. */
|
||||
MEMMOVE(VG_Z_LD64_SO_1, memmove)
|
||||
|
||||
#elif defined(VGO_freebsd)
|
||||
MEMMOVE(VG_Z_LD_ELF_SO_1, memmove)
|
||||
MEMMOVE(VG_Z_LD_ELF32_SO_1, memmove)
|
||||
MEMMOVE(VG_Z_LIBC_SONAME, memmove)
|
||||
|
||||
#elif defined(VGO_darwin)
|
||||
# if DARWIN_VERS <= DARWIN_10_6
|
||||
MEMMOVE(VG_Z_LIBC_SONAME, memmove)
|
||||
@ -1338,6 +1436,11 @@ static inline void my_exit ( int x )
|
||||
#if defined(VGO_linux)
|
||||
BCOPY(VG_Z_LIBC_SONAME, bcopy)
|
||||
|
||||
#elif defined(VGO_freebsd)
|
||||
BCOPY(VG_Z_LIBC_SONAME, bcopy)
|
||||
BCOPY(VG_Z_LD_ELF_SO_1, bcopy)
|
||||
BCOPY(VG_Z_LD_ELF32_SO_1, bcopy)
|
||||
|
||||
#elif defined(VGO_darwin)
|
||||
//BCOPY(VG_Z_LIBC_SONAME, bcopy)
|
||||
//BCOPY(VG_Z_DYLD, bcopy)
|
||||
@ -1414,6 +1517,9 @@ static inline void my_exit ( int x )
|
||||
#if defined(VGO_linux)
|
||||
GLIBC232_STRCHRNUL(VG_Z_LIBC_SONAME, strchrnul)
|
||||
|
||||
#elif defined(VGO_freebsd)
|
||||
GLIBC232_STRCHRNUL(VG_Z_LIBC_SONAME, strchrnul)
|
||||
|
||||
#elif defined(VGO_darwin)
|
||||
|
||||
#elif defined(VGO_solaris)
|
||||
@ -1667,6 +1773,9 @@ static inline void my_exit ( int x )
|
||||
STRSTR(VG_Z_LIBC_SONAME, __strstr_sse2)
|
||||
STRSTR(VG_Z_LIBC_SONAME, __strstr_sse42)
|
||||
|
||||
#elif defined(VGO_freebsd)
|
||||
STRSTR(VG_Z_LIBC_SONAME, strstr)
|
||||
|
||||
#elif defined(VGO_darwin)
|
||||
|
||||
#elif defined(VGO_solaris)
|
||||
@ -1712,6 +1821,9 @@ static inline void my_exit ( int x )
|
||||
#if defined(VGO_linux)
|
||||
STRPBRK(VG_Z_LIBC_SONAME, strpbrk)
|
||||
|
||||
#elif defined(VGO_freebsd)
|
||||
STRPBRK(VG_Z_LIBC_SONAME, strpbrk)
|
||||
|
||||
#elif defined(VGO_darwin)
|
||||
|
||||
#elif defined(VGO_solaris)
|
||||
@ -1759,6 +1871,9 @@ static inline void my_exit ( int x )
|
||||
STRCSPN(VG_Z_LIBC_SONAME, strcspn)
|
||||
STRCSPN(VG_Z_LIBC_SONAME, __GI_strcspn)
|
||||
|
||||
#elif defined(VGO_freebsd)
|
||||
STRCSPN(VG_Z_LIBC_SONAME, strcspn)
|
||||
|
||||
#elif defined(VGO_darwin)
|
||||
|
||||
#elif defined(VGO_solaris)
|
||||
@ -1806,6 +1921,9 @@ static inline void my_exit ( int x )
|
||||
#if defined(VGO_linux)
|
||||
STRSPN(VG_Z_LIBC_SONAME, strspn)
|
||||
|
||||
#elif defined(VGO_freebsd)
|
||||
STRSPN(VG_Z_LIBC_SONAME, strspn)
|
||||
|
||||
#elif defined(VGO_darwin)
|
||||
|
||||
#elif defined(VGO_solaris)
|
||||
@ -1862,6 +1980,9 @@ static inline void my_exit ( int x )
|
||||
STRCASESTR(VG_Z_LIBC_SONAME, strcasestr)
|
||||
# endif
|
||||
|
||||
#elif defined(VGO_freebsd)
|
||||
STRCASESTR(VG_Z_LIBC_SONAME, strcasestr)
|
||||
|
||||
#elif defined(VGO_darwin)
|
||||
|
||||
#elif defined(VGO_solaris)
|
||||
@ -1888,12 +2009,7 @@ static inline void my_exit ( int x )
|
||||
return i; \
|
||||
}
|
||||
|
||||
#if defined(VGO_linux)
|
||||
WCSLEN(VG_Z_LIBC_SONAME, wcslen)
|
||||
|
||||
#elif defined(VGO_darwin)
|
||||
|
||||
#elif defined(VGO_solaris)
|
||||
#if defined(VGO_linux) || defined(VGO_freebsd) || defined(VGO_solaris)
|
||||
WCSLEN(VG_Z_LIBC_SONAME, wcslen)
|
||||
|
||||
#endif
|
||||
@ -1915,7 +2031,7 @@ static inline void my_exit ( int x )
|
||||
return i; \
|
||||
}
|
||||
|
||||
#if defined(VGO_linux)
|
||||
#if defined(VGO_linux) || defined(VGO_freebsd)
|
||||
WCSNLEN(VG_Z_LIBC_SONAME, wcsnlen)
|
||||
WCSNLEN(VG_Z_LIBC_SONAME, __GI_wcsnlen)
|
||||
#endif
|
||||
@ -1947,7 +2063,7 @@ static inline void my_exit ( int x )
|
||||
return 0; \
|
||||
}
|
||||
|
||||
#if defined(VGO_linux)
|
||||
#if defined(VGO_linux) || defined(VGO_freebsd)
|
||||
WCSCMP(VG_Z_LIBC_SONAME, wcscmp)
|
||||
#endif
|
||||
|
||||
@ -1977,7 +2093,7 @@ static inline void my_exit ( int x )
|
||||
s1++; s2++; n++; \
|
||||
} \
|
||||
}
|
||||
#if defined(VGO_linux)
|
||||
#if defined(VGO_linux) || defined(VGO_freebsd)
|
||||
WCSNCMP(VG_Z_LIBC_SONAME, wcsncmp)
|
||||
#endif
|
||||
|
||||
@ -2014,7 +2130,7 @@ static inline void my_exit ( int x )
|
||||
return dst_orig; \
|
||||
}
|
||||
|
||||
#if defined(VGO_linux) || defined(VGO_solaris)
|
||||
#if defined(VGO_linux) || defined(VGO_solaris) || defined(VGO_freebsd)
|
||||
WCSCPY(VG_Z_LIBC_SONAME, wcscpy)
|
||||
#endif
|
||||
|
||||
@ -2037,7 +2153,7 @@ static inline void my_exit ( int x )
|
||||
} \
|
||||
}
|
||||
|
||||
#if defined(VGO_linux)
|
||||
#if defined(VGO_linux) || defined(VGO_freebsd)
|
||||
WCSCHR(VG_Z_LIBC_SONAME, wcschr)
|
||||
#endif
|
||||
/*---------------------- wcsrchr ----------------------*/
|
||||
@ -2059,7 +2175,7 @@ static inline void my_exit ( int x )
|
||||
} \
|
||||
}
|
||||
|
||||
#if defined(VGO_linux)
|
||||
#if defined(VGO_linux) || defined(VGO_freebsd)
|
||||
WCSRCHR(VG_Z_LIBC_SONAME, wcsrchr)
|
||||
#endif
|
||||
|
||||
@ -2089,11 +2205,14 @@ static inline void my_exit ( int x )
|
||||
WMEMCHR(VG_Z_LIBC_SONAME, __GI_wmemchr)
|
||||
#endif
|
||||
|
||||
#if defined(VGO_freebsd)
|
||||
WMEMCHR(VG_Z_LIBC_SONAME, wmemchr)
|
||||
#endif
|
||||
/*------------------------------------------------------------*/
|
||||
/*--- Improve definedness checking of process environment ---*/
|
||||
/*------------------------------------------------------------*/
|
||||
|
||||
#if defined(VGO_linux)
|
||||
#if defined(VGO_linux) || defined(VGO_freebsd)
|
||||
|
||||
/* If these wind up getting generated via a macro, so that multiple
|
||||
versions of each function exist (as above), use the _EZU variants
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user