master
vg_regtest: Miscellaneous tweaks
Fix none/tests/amd64/pcmpxstrx64.c
Cleanups in regression test makefiles
Darwin regtst: turn off debug traces in none apple-main-arg
Regtest: remove duplicate break from iropt-test/unary.c
Remove essentially empty .stderr.exp files in none/tests/...
s390x: Implement DIDBR and DIEBR instructions
Solaris regtest: fix build of one x86 SSE test on OmniOS
Implement PMOVSXBW SSE4.1 for x86
Bug 345248 - add support for Solaris OS in valgrind
fix 286270 VG_(env_remove_valgrind_env_stuff)
riscv64: Add initial support: test modifications
Add callgrind.h
Added a regression test that checks if command line arguments with spaces work.
Fix testcase such that it can be run under cron on Solaris. The tescase depends on SIGHUP to be delivered but cron on Solaris ignored the signal. So it needs to be enabled in child processes after fork. Patch by Ivo Raisr <ivosh@ivosh.net>. Fixes BZ #350809.
Refactor and recomment async-sigs so it's easier to understand. Send all its output to stderr as well.
FreeBSD support, patch 9
MIPS specific exp-out for none/tests/async-sigs.
Add a test that triggers sector recycling (cfr bug fix in revision 15058: without 15058, the below test loops for ever).
make it compile on FreeBSD
Regression test for fix for #129866.
none/tests/bug234814.c: sa_handler take an int as argument
Add (presently) failing test case for bz#234814.
Regtest: clean up warning and compilation of bug290061.c
Bug 290061 - pie elf always loaded at 0x108000
Bug 491394i - (vgModuleLocal_addDiCfSI): Assertion 'di->fsm.have_rx_map && di->fsm.rw_map_count' failed.
Solaris: Fix GCC -Waddress warnings
Bug 492678 - SIGALRM race condition (sighandler called after timer disarmed
Fix asserts in testcases close_range, bug514094 and readlinkat_self.
Forgot to add these in r10690.
The version string from --version was being printed to stderr. This commit fixes it to print to stdout. I added a regression test for this.
Bug 514297 - Track madvise MADV_GUARD_INSTALL in address space manager
Hide the --max-guard-pages cmdline switch on non-linux
Various option-related tweaks:
Bug 351857 - confusing error message about valid command line option
Fixed up various command line option scenarios: - If no tool is specified, V now gives a short message and a list of available tools. This was meant to happen previously, but a bug prevented it from working properly; it gave the usage message instead.
Fix BZ 334802. Patch by Mark Wielaard with a few mods to make it apply. r14794 is related as well. Also: remove -Wno-format-zero-length from compile options.
Overhaul the way programs are loaded at startup and exec() works. Now the checking of programs done in these two places are combined, which avoids duplicate code and greatly reduces the number of cases in which exec() fails causing Valgrind to bomb out.
Use pclose instead of fclose to close pipes opened with popen, which also allows us to drop the loop that was supposed to give the child a chance to exit as the pclose will wait properly for the child.
Merge r9380, r9381 (test portability tweaks) from the DARWIN branch.
Files updated, added and removed in order to turn the ERASER branch into HEAD
Fix #284384 (clang 3.1 -Wunused-value warnings in valgrind.h, memcheck.h) by changing a bunch of VALGRIND_DO_CLIENT_REQUEST_EXPR into VALGRIND_DO_CLIENT_REQUEST_STMT for cases where the return value of the former would be unused. (Bart Van Assche, bart.vanassche@gmail.com)
Moved discard, clientperm and clientstackperm from tests/ into the test suite-proper, giving them .vgtest files and all that. They don't make sense for 1.0.X because the client request constants are different in HEAD, indeed one of them (clientperm) fails with --stable.
Improve none/tests/double_close_range test and filter_fdleak
Add file descriptor suppression tests
Bug 390310 - Output summaries in XML files
Add the tests for --track-fds=yes --xml=yes
Make the Linux launcher more like the Darwin one in how it reads the executable headers. This means it no longer crashes on an empty executable. Fixes bug 156065.
Darwin regtest: add an expected for none empty-exe
Add other .exp file for exec-sigmask.
Merge in changes from the 2.4.0 line. This basically brings in the overhaul of the thread support. Many things are now probably broken, but at least with --tool=none, simple and not-so-simple threaded and non-thread programs work.
Add new files resulting from merging in the 2.4.0 line. Many of these seem to be simply duplication of the x86 instruction set tests into the addrcheck and helgrind trees. I'm not sure what this duplication achieves.
Warn for execve syscall with argv or argv[0] being NULL.
Don't try and validate the contents of the environment passed to the execve system call if the envp pointer is null as it causes valgrind to die with a segmentation fault.
Split faultstatus into the platform independent tests and those which are x86 specific. The first three x86 specific ones should work on amd64 as well so I have added those as amd64 tests.
Add an .exp for s390x. Certain older kernels had a bug in providing an invalid siginfo for SIGBUS. Hunted down and fixed by Christian Borntraeger (borntraeger@de.ibm.com).
Illumos regtest: add 'illumos' to os_test and turn off a few tests
Modified the fcntl system call so that only those reason codes which can block (ie F_SETLKW) are treated as blocking.
Add BadFdExtra core error.
Report track-fd errors for fd used which was not opened or already closed
fd regtest: add filter to new fdbaduse testcase
Remove fdleak.h CLOSE_INHERITED_FDS workaround
regtest: use /bin/cat in none/tests/fdleak_cat.vgtest
Treat all inherited file descriptors the same with --track-fds.
PR140939 --track-fds reports leakage of stdout/in/err and doesn't respect -q
Linux arm regtest: add another leak suppression and broaden filter
ppc64le regtest: update a few xml expecteds
Illumos regtest: a couple of fixes to none fd tests
Check whether file descriptor is inherited before printing where_opened
Move a heap of tests from corecheck/tests/ into none/tests/. There's no real point in having them in corecheck/tests since they're not testing anything that Nulgrind doesn't provide.
ppc regtest: update expected for none fdleak_ipv4_xml
regtest PPC: update a few XML expecteds after bug390310
FreeBSD regtest: a couple of updates for FreeBSD 13.5 x86
FreeBSD regtest: update filters for fdleak tests
Update emitted Copyright years to include 2024
Bug 513533 - Support macOS 11.0 (Big Sur)
Fix the testcase so it works on platforms where _IOC_NONE != 0 Filtering script and expected output file adapted.
Fixed minor problem in regtest script.
getdents_filter.vgtest: Add filter_sort
Update .exp files for r10783.
Fix some spelling mistakes. Fixes BZ#374719 Patch by: klemens <ka7@la-evento.com>
FreeBSD: mostly filters and suppressions for fdleak tests
Make fork test deterministic.
Changed test so the output doesn't depend on the order in which the parent and child run; this was random so the test was failing spuriously sometimes.
none/tests/ifunc.c: Fix a compiler warning
Add testcase from bugzilla #301204. Testcase by Chantry Xavier (shiningxc@gmail.com).
Darwin regtest: update none ioctl_moans
Bug 170510 - Don't warn about ioctl of size 0 without direction hint
Make moans about unknown ioctls more informative (#336772)
s390: long displacement facility related cleanups (BZ 509562)
testcases: Cleanup garbage.filtered.out
Don't leave fds created with --log-file, --xml-file or --log-socket open
Merge r9533..9536 (add tests/{asm.h,sys_mman.h,malloc.h} from the DARWIN branch.
Merge r9429 (map_unaligned porting) from the DARWIN branch.
mmap/munmap exerciser test
Fix typos in source code. Patch by Dmitriy (olshevskiy87@bk.ru). Fixes BZ #349874
Don't break fcntl locks when program does mmap. #280965. (Rusty Russell, rusty@rustcorp.com.au)
Darwin: various fixes
Bug 480405 - valgrind 3.22.0 "m_debuginfo/image.c:586 (set_CEnt): Assertion '!sr_isError(sr)' failed."
Remove some warnings from tests
Add a nested-functions test from Lee Kindness.
Don't require the current working directory to exist. Bug #369209.
Beef up VG_(strerror) to provide correct messages for the errno codes in asm-generic/errno-base.h (on linux). The error strings were obtained by calling strerror natively in Linux. Extend vki-linux.h accordingly. vki-darwin.h already had those errno codes. Add testcase. This fixes #287858.
Merge r9456 (pending change) from the DARWIN branch.
Sanitize signal mask in ppoll and pselect syscalls Reported and Linux patch contributed by Steven Smith <sos22@archy.org.uk> Fixes BZ#359871
none/tests/process_vm_readv_writev: Avoid that compilation of this test program triggers a compiler warning
Ignore pselect_sigmask_null executable. Part of fix for BZ#364413.
Bug 364413 pselect sycallwrapper mishandles NULL sigmask.
Add small sleep to none/tests/pth_2sig to help prevent hanging
Fix test none/tests/pth_2sig on Solaris. When signal SIGINT was used, it got propagated to the parent shell and therefore the regression test suite was terminated. With SIGTERM only the parent exits, as is supposed. Verified that this changed test case still reproduces the original problem on Linux and Solaris, when r16140 is temporarily undone. Follow up to r16140 and r16143 and BZ#372600.
Musl issues: Fix none/tests/pth_atfork1.c
Move a bunch of tests from corecheck/tests/ to none/tests/.
Merge r6113:
Merge r9564 (make pth_cvsimple more reliable) from the DARWIN branch.
make pth_self_kill_15_other test deterministic
Fix 409141 and 409367: valgrind hangs or loops when a process sends a signal to itself.
The calculation used to round the size of a new thread's stack to a multiple of the page size had an off by one error. Fixed it to use the PGROUNDUP macro instead of trying to do the calculation itself and then get it wrong.
Fix 361615 - Inconsistent termination for multithreaded process terminated by signal
Darwin: many fixes for OSX 10.13
Allow spaces in .valgrindrc files
Bug 514343 - Add a valgrind.h macro VALGRIND_REPLACES_MALLOC
New flag --require-text-symbol=:sopatt:fnpatt, to be used to check that specified shared objects contain specified symbols. Along with a couple of regtests that unfortunately will fail on MacOSX.
Darwin regtest: make a variant of none require-text-symbol-2
Move some more Corecheck tests into none/tests.
Explicitly test command -v host output before trying host command.
fix this test for me. You can't rely on having exactly 3 nameservers configured in your system, can you?
Remove --vex-iropt-precise-memory-exns, implement --vex-iropt-register-updates
Commit rewrite of semaphore handling to avoid having a fixed upper limit. Patch courtesy of Aleksander Salwa <A.Salwa@osmosys.tv>.
Final patch for Char/HChar mixups. Remove -Wno-pointer-sign from configure.in. Fixes 273227.
none/tests: Add test for bz414565.
Fix 372504 Hanging on exit_group
Fix bug 72650. Only restart syscalls on signal if the client asked for it.
Suppress an error within syslog(). Patch from Dan Kegel. Fixes bug 191192.
Fix so that new versions of system (using clone()) work.
gcc-2.96 build fixes.
Change a bunch of pointer <-> int casts to pointer <-> long casts so as to stop gcc complaining so much on 64-bit platforms.
Add test case for forking threaded programs.
regtest macOS: macOS has no timer fds, so not timer_create etc.
In r10465 --time-stamp=yes got slightly broken -- the space between the time and the PID was removed. This commit adds it back in. It also adds a basic test that would have detected this regression, and also the breakage in bug 200990.
fix 338160: Implement QGetTlsAddr query so that GDB+V gdbsrv can print __thread variables.
This change implements the TLS extension to the x86 ABI. This allows threads to have thread-private data which is quickly accessible via a segment in the GDT, stored in %gs. The patch implements the relevent syscalls (setthreadarea), and also manages switching the VCPU's segment information at thread context-switch time. Mostly Tom Hughes' work.
Close both internal pipe fds after VG_(fork) in parent and child
Regtest: another test that needs to increase the value for an 'unused' fd.
Add "bad" option for --track-fds.
Add "yes" argument for the --modify-fds option.
FreeBSD: changes for --modify-fds
Illumos regtest: update none/tests/track_new
Illumos: changes for --modify-fds
regtest: fix compiler warnings with clang 16
Fix rounding when printing floating point numbers.
Add limited support for printing floating point numbers to VG_(debugLog_vprintf). Remove function VG_(percentify) and fix up its call sites (part of fixing BZ #337869. Allow the width in a format specification to be '*', i.e. the width is given as an additional function argument.
Regtest: increase the 'unused' fd value in none use_after_close
Fix compile errors following function prototype change.
Bug 338365 - New client request to fetch valgrind version
With the recent VG_(message) change, VALGRIND_{PRINTF,PRINTF_BACKTRACE,INTERNAL_PRINTF} were no longer appending newlines. This meant that --trace-malloc=yes spewed everything onto a single line, among other things.
Bug 358697 - valgrind.h: Some code remains even when defining NVALGRIND. Patch from Matthias Schwarzott (zzam@gentoo.org). The patch removes a volatile memory read which was only there to stop compilers warning about |format| being unused.