592 Commits

Author SHA1 Message Date
Paul Floyd
68ce22acc7 DRD regtest: half fix tc22_exit_w_lock on macOS 10.15
Still has (below main) like Solaris (but unlike macOS 10.14)
2025-12-24 14:29:14 +01:00
Paul Floyd
7e77fe49cc DRD regtest: delete tc22_exit_w_lock 32bit variant, rename 64bit one
The 32bit one isn't used by FreeBSD x86. In the event that it is needed
by some platform I'll put it back.
2025-12-24 13:18:36 +01:00
Paul Floyd
738cb901f7 Solaris regtest: update for drd/tests/tc22_exit_w_lock
I removed -q so that the test passes with Darwin. That
only caused the test to fail on illumos. Ho hum.
2025-12-24 11:38:23 +01:00
Paul Floyd
3b4a7e565c DRD regtest: don't use -q with tc22_exit_w_lock
This seems a better fix than turning off Darwin aysync signal
termination messages.

Also I don't think that the 32bit variant is used any more.
2025-12-23 16:34:16 +01:00
Florian Krohm
778fe51a69 testsuite: Tidy. Remove empty .stdout.exp files
As per tests/vg_regtest:

 Expected stdout (filtered) is kept in <test>.stdout.exp* (can be more
 than one expected output).  It can be missing if it would be empty.
2025-12-13 18:37:27 +00:00
Paul Floyd
68bc32225c Darwin regtest: update a few expecteds
One predated correct redirection of the C++ library operator new
One has a few line number changes plus I removed an assert that is firing
(asserts firing in tests is never a good thing). And the last one is just
line number changes.
2025-12-11 09:06:38 +01:00
Paul Floyd
c15bcfe15b Darwin regtest: DRD filters and more suppressions 2025-12-01 22:26:10 +01:00
Paul Floyd
cfc8b0706a Linux DRD suppression: add an entry for __is_decorate_maps_enabled
Seen on Fedora 43
2025-12-01 08:12:30 +01:00
Paul Floyd
dde5c22436 Darwin: updates to macho loading and turn off hanging regtests
Code merges from Louis Brunner.
Turn off 7 tests that are hanging.
Updates to filtering.
2025-11-29 21:14:44 +01:00
Paul Floyd
6a5c15def7 Darwin DRD and Helgrind: clean up suppressions
Also fix one DRD testcase where a pthread function returns a
different error code.
2025-11-28 13:36:43 +01:00
Paul Floyd
097cd6ccfc Bug 512571 - regtest problems with darwin dsymuti
There was alrwady a stderr filter for dsymutil, but only for DRD.
So I moved that to tests/filter_stderr_basic.in

I added single quotes around $dir in tests/vg_regtest.in for
arch_test and os_test. That now prevents directory names containing
spaces from being seen as more than one argument.
2025-11-25 08:20:06 +01:00
Paul Floyd
b6cd12b0f8 Darwin: deprecated warning cleanup
Mainly sem* and syscall().
2025-10-25 23:04:37 +02:00
Mark Wielaard
3392155359 Upgrade to GNU General Public License version 3
- Update COPYING and VEX/LICENSE.GPL to version 3.
- Update README, NEWS, docs/manual license and contributing text.
- Update file headers to say either version 3 of the License,
  or (at your option) any later version.
- Leave tests and perf file headers as is, unless the code is derived
  from Valgrind/VEX.
- Leave valgrind.h, cachegrind.h, callgrind.h, drd.h, helgrind.h,
  memcheck.h and dhat.h Hybrid-BSD licensed.
2025-10-18 00:55:07 +02:00
Florian Krohm
b5b7e0238a Fix file permissions.
The following files do not need to be executable:
- configure.ac
- Makefile*am
- *.in

The following files lack execute permission:
- tests/platform_test
- tests/vg_regtest
- perf/vg_perf

So from now on you can just run  tests/vg_regtest and perf/vg_perf
without the perl prefix.
Docs changed accordingly.
2025-09-26 22:01:46 +00:00
Paul Floyd
1a38f5d9bb Linux clang: fix 2 build warnings and 1 error in tests
clang++ not supporting sized deallocation by default is a bit
annoying.
2025-09-17 12:52:07 +02:00
Paul Floyd
988d80f0e7 regtest warnings: fix unused returns and missing noexcept specifiers
GCC 15.1.1 is still giving a -Walloc-size-larger-than= warning for
memcheck calloc-overflow.c
2025-05-26 22:02:35 +02:00
Paul Floyd
6dd49fc455 regtest PPC: update a few XML expecteds after bug390310 2025-05-26 08:21:23 +02:00
Paul Floyd
7786b075ab Bug 390310 - Output summaries in XML files
Original patch contributed by renaultd@free.fr
2025-05-25 21:04:25 +02:00
Paul Floyd
8dbf86733e FreeBSD regtest: updates for FreeBSD 15.0-CURRENT
Mostly minor expected/filter changes.

Helgrind did detect a race condition in a Valgrind file static
variable. Teh DRD dlopen test needs to be linked with the thread library.

In a VirtualBox environment I'm getting 4 hanging testcases
(3 in gdbserver_tests and none/freebsd/bug452274).
2025-05-16 21:32:02 +02:00
Paul Floyd
98d78dde1f FreeBSD regtest: cleanup test warnings when building with GCC 2025-05-04 10:38:50 +02:00
Paul Floyd
7d3ee1f1a0 Illumos resgtest: revert previous change to filter_libc and update expected instead 2025-04-05 08:16:54 +02:00
Paul Floyd
fc5099c2b7 Illumos regtest: one filter and one pre script fix
filter a change for the bottom of thread stacks and
add use the same pre check as Linux for DRD OpenMP tests.
2025-04-04 22:00:38 +02:00
Paul Floyd
b918889d6c Remove exec bits on a few files and delete a Solaris regtest binary
Pushed the binary by mistake in Sept 2023!
2025-02-07 12:37:04 +01:00
Mark Wielaard
907b985725 drd/tests/swapcontext.c: Rename typedef struct thread_local to threadlocal
Since C23 thread_local is a keyword (thread storage duration).

swapcontext.c:23:16: error: expected '{' before 'thread_local'
   23 | typedef struct thread_local {
      |                ^~~~~~~~~~~~
swapcontext.c:23:16: warning: 'thread_local' is not at beginning of declaration [-Wold-style-declaration]
swapcontext.c:23:16: error: 'thread_local' used with 'typedef'
swapcontext.c:26:3: warning: data definition has no type or storage class
   26 | } thread_local_t;
      |   ^~~~~~~~~~~~~~
2024-11-23 23:15:53 +01:00
Paul Floyd
b876495041 Bug 491394i - (vgModuleLocal_addDiCfSI): Assertion 'di->fsm.have_rx_map && di->fsm.rw_map_count' failed. 2024-08-21 21:26:05 +02:00
Paul Floyd
e6113df791 DRD regtest: try to make drd/tests/pth_mutex_signal less flaky
Use a loop of 1ms usleeps rather than a single 1s usleep.
This is usually more releable in ensuring that there's a context switch and that signals
get handled in the order that we want.
2024-04-30 07:58:38 +02:00
Mark Wielaard
1fbdd7360a Add new bar_bad exp files to drd/tests/Makefile.am (EXTRA_DIST). 2024-04-24 19:24:02 +02:00
Mark Wielaard
123ff7e104 Add another drd/tests/bar_bad exp variant.
An uninitialized barrier might not be recognized as a barrier at all.
2024-04-24 18:45:46 +02:00
Mark Wielaard
d9e564a1a8 Add dl_new_hash suppression to drd/tests/std_thread2.supp
_dl_lookup_symbol_x is already suppressed and normally _dl_new_hash
seems inlined, but on some systems it isn't.
2024-04-24 16:00:49 +02:00
Mark Wielaard
847f1d414d filter out in /absolute/path in drd/tests stderr filter
This filters out a line like:
by 0x........: ??? (in /home/mjw/valgrind/helgrind/tests/tc04_free_lock)
and replaces it with
by 0x........: ???
2024-04-20 22:57:44 +02:00
Mark Wielaard
d216fff966 Update emitted Copyright years to include 2024
Also adjust test exp and filters.
2024-04-20 04:13:04 +02:00
Mark Wielaard
3fe22d4faf Add @configure_input@ to all filer files generated by configure
This will add a comment at the top of each filter file saying:

 filter_file.  Generated from filter_file.in by configure.
2024-04-14 23:56:48 +02:00
Mark Wielaard
5505e7b371 Add __set_vma_name suppression to drd/tests/std_thread2.supp
glibc uses a atomic var to set whether the kernel supports
PR_SET_VMA_ANON_NAME. This looks like a conflicting access to drd.
Suppress it for this testcase.
2024-04-11 19:48:31 +02:00
Paul Floyd
554b82753c FreeBSD DRD and Helgrind: add sem_clockwait_np wrappers
Helgrind wrapper was complicated because sem_wait calls
sem_clockwait_np.
2024-03-31 18:04:04 +02:00
Paul Floyd
d064952329 musl: updates to suppressions and drd pthread detection script
Mostly for DRD.
2024-02-17 18:24:36 +01:00
Paul Floyd
0dbad995ff linux arm DRD: add an expected for tc19_shadowmem
Probably because rpi 3 and later run an aarch64 kernel but arm32
userland this testcase gives results very similar to the 64bit
expected.
2024-02-17 14:23:26 +01:00
Paul Floyd
de2cd7f6f9 Bug 476331 - clean up generated/distributed filter scripts 2024-02-02 22:27:25 +01:00
Paul Floyd
22fca30905 DRD regtest: add ARM expecteds for annotate_trace_memory
The diff is that one 8byte access is being split into two 4byte
acceses.
2024-01-28 10:09:41 +01:00
Bart Van Assche
a9d065c48d configure.ac: Convert the thrd_create() test from C++ to C 2023-10-16 06:32:39 -07:00
Bart Van Assche
45590cee74 drd/tests/thrd_create: Convert from C++ to C 2023-10-16 06:27:46 -07:00
Paul Floyd
753615edaa FreeBSD regtest: add required library for C11 threads 2023-10-15 20:42:29 +02:00
Bart Van Assche
6cea271f43 drd: Add support for C11 thrd_create() 2023-10-15 08:32:04 -07:00
Paul Floyd
9f28b44348 regtest: fix compiler warnings with clang 16
Mostly warnings about deprecated use of K&R function definitions.
2023-08-27 16:57:24 +02:00
Paul Floyd
b368b44c55 Solaris: add a configure test for getaddrinfo
Not available on Solaris 11.3
2023-07-24 21:32:45 +02:00
Paul Floyd
40b914f0d0 Add Helgrind and DRD tests and suppressions for getaddrinfo on Linux
Bump version to 3.22.0.GIT

The testcase was posted on the freebsd-hackers mailing list.
I had time to get suppressions for FreeBSD into 3.21 but
ran out of time for the test and Linux suppressions.

I did take a look at how thread sanitizer handles this.
Basically it intercepts the call, turns off checking,
calls the resl function then turns checking back on.

I don't see many other similar examples. Might be worth
looking at dlopen and atexit.
2023-05-05 22:05:36 +02:00
Paul Floyd
50bded71b2 Bug 436413 - Warn about realloc of size zero
Adds a new warning to memcheck when realloc is used with a size of 0.
For a long time this has been "implementation defined" and so
non-portable. With C23 it will become UB.

Also adds a switch to turn off the error generation and a
second switch to select between the most common
"implementation" behaviours. The defaults for this second
switch are baked in at build time.
2023-03-10 21:55:14 +01:00
Paul Floyd
3a92995a85 DRD aarch64: Add some suppressions for DRD libstdc++
Also fix building drd/tests/std_mutex, needs -pthread.
2023-02-17 22:25:41 +01:00
Paul Floyd
add5fe9832 DRD regtest: try to make timed_mutex more reliable
On RHEL 7.6 ARM I see this with the lock returning false
but without the 11 second timeout. Try adding some sleeps.
2023-02-03 19:27:39 +01:00
Paul Floyd
dfaf018733 DRD regtesat: update suppression file for std_threads2
On RHEL 7.6 ARM glibc 2.17 is used which doesn't match the 2.2*
wildard, so widen the wildcard to just 2.*
2023-02-03 19:10:50 +01:00
Paul Floyd
cdabd4ba74 Regtest: foix warning from drd test pth_mutex_signal.c
GCC on RHEL 7.6 ARM complains about the empty init list.

I also noticed that we are using the SA_NOTIFY form of sigaction
(with that union member and handler prototype) but not setting the
SA_NOTIFY flag. Seems harmless in this case as we don't use
the siginfo or context.
2023-02-03 13:48:22 +01:00