Skip to content

Commit 8f43a6d

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 99f1028 + 677f4f8 commit 8f43a6d

File tree

417 files changed

+15818
-18417
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

417 files changed

+15818
-18417
lines changed

.gitignore

+52-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
# /auxprogs/
4444
/auxprogs/.deps
4545
/auxprogs/getoff-amd64-darwin
46+
/auxprogs/getoff-arm-linux
4647
/auxprogs/getoff-arm64-linux
4748
/auxprogs/getoff-x86-darwin
4849
/auxprogs/getoff-amd64-linux
@@ -106,6 +107,7 @@
106107
/cachegrind/tests/cachegrind.out.*
107108
/cachegrind/tests/chdir
108109
/cachegrind/tests/clreq
110+
/cachegrind/tests/clreq2
109111
/cachegrind/tests/dlclose
110112
/cachegrind/tests/wrap5
111113

@@ -480,6 +482,7 @@
480482
/drd/tests/tc22_exit_w_lock
481483
/drd/tests/tc23_bogus_condwait
482484
/drd/tests/tc24_nonzero_sem
485+
/drd/tests/thrd_create
483486
/drd/tests/threaded-fork
484487
/drd/tests/thread_name
485488
/drd/tests/thread_name_freebsd
@@ -531,7 +534,15 @@
531534
/exp-bbv/tests/amd64-linux/rep_prefix
532535

533536
# /exp-bbv/tests/arm-linux/
537+
/exp-bbv/tests/arm-linux/*.post.diff
538+
/exp-bbv/tests/arm-linux/*.post.out
539+
/exp-bbv/tests/arm-linux/*.stderr.diff
540+
/exp-bbv/tests/arm-linux/*.stderr.out
541+
/exp-bbv/tests/arm-linux/*.stdout.diff
542+
/exp-bbv/tests/arm-linux/*.stdout.out
534543
/exp-bbv/tests/arm-linux/.deps
544+
/exp-bbv/tests/arm-linux/ll
545+
/exp-bbv/tests/arm-linux/million
535546
/exp-bbv/tests/arm-linux/Makefile
536547
/exp-bbv/tests/arm-linux/Makefile.in
537548

@@ -845,6 +856,7 @@
845856
/memcheck/tests/bug287260
846857
/memcheck/tests/bug340392
847858
/memcheck/tests/bug464969_d_demangle
859+
/memcheck/tests/bug472219
848860
/memcheck/tests/calloc-overflow
849861
/memcheck/tests/cdebug_zlib
850862
/memcheck/tests/cdebug_zlib_gnu
@@ -865,6 +877,7 @@
865877
/memcheck/tests/descr_belowsp
866878
/memcheck/tests/dir
867879
/memcheck/tests/doublefree
880+
/memcheck/tests/duplicate_align_size_errors
868881
/memcheck/tests/dw4
869882
/memcheck/tests/erringfds
870883
/memcheck/tests/error_counts
@@ -931,6 +944,8 @@
931944
/memcheck/tests/nanoleak
932945
/memcheck/tests/nanoleak2
933946
/memcheck/tests/nanoleak_supp
947+
/memcheck/tests/new_aligned_delete_default
948+
/memcheck/tests/new_delete_mismatch_size
934949
/memcheck/tests/new_nothrow
935950
/memcheck/tests/new_override
936951
/memcheck/tests/noisy_child
@@ -970,7 +985,9 @@
970985
/memcheck/tests/sh-mem
971986
/memcheck/tests/sh-mem-random
972987
/memcheck/tests/sized_aligned_new_delete_args
973-
/memcheck/tests/sized_aligned_new_delete_misaligned
988+
/memcheck/tests/sized_aligned_new_delete_misaligned1
989+
/memcheck/tests/sized_aligned_new_delete_misaligned2
990+
/memcheck/tests/sized_aligned_new_delete_misaligned3
974991
/memcheck/tests/sigaltstack
975992
/memcheck/tests/sigkill
976993
/memcheck/tests/signal2
@@ -1009,6 +1026,7 @@
10091026
/memcheck/tests/wcs
10101027
/memcheck/tests/weirdioctl
10111028
/memcheck/tests/with space
1029+
/memcheck/tests/wcsncpy
10121030
/memcheck/tests/wmemcmp
10131031
/memcheck/tests/wrap1
10141032
/memcheck/tests/wrap2
@@ -1045,6 +1063,7 @@
10451063
/memcheck/tests/amd64/insn-bsfl
10461064
/memcheck/tests/amd64/insn-pmovmskb
10471065
/memcheck/tests/amd64/insn-pcmpistri
1066+
/memcheck/tests/amd64/pcmpgt
10481067
/memcheck/tests/amd64/sh-mem-vec128
10491068
/memcheck/tests/amd64/sh-mem-vec256
10501069
/memcheck/tests/amd64/xsave-avx
@@ -1190,6 +1209,7 @@
11901209
/memcheck/tests/s390x/Makefile
11911210
/memcheck/tests/s390x/Makefile.in
11921211
/memcheck/tests/s390x/cdsg
1212+
/memcheck/tests/s390x/cli
11931213
/memcheck/tests/s390x/cu21
11941214
/memcheck/tests/s390x/cu42
11951215
/memcheck/tests/s390x/ltgjhe
@@ -1283,6 +1303,7 @@
12831303
/memcheck/tests/x86/fxsave
12841304
/memcheck/tests/x86/int3-x86
12851305
/memcheck/tests/x86/more_x86_fp
1306+
/memcheck/tests/x86/pcmpgt
12861307
/memcheck/tests/x86/pushfpopf
12871308
/memcheck/tests/x86/pushfw_x86
12881309
/memcheck/tests/x86/pushpopmem
@@ -1340,11 +1361,14 @@
13401361
/memcheck/tests/freebsd/Makefile.in
13411362
/memcheck/tests/freebsd/452275
13421363
/memcheck/tests/freebsd/access
1364+
/memcheck/tests/freebsd/aligned_alloc
13431365
/memcheck/tests/freebsd/bug464476
13441366
/memcheck/tests/freebsd/bug470713
13451367
/memcheck/tests/freebsd/capsicum
13461368
/memcheck/tests/freebsd/chflags
13471369
/memcheck/tests/freebsd/chmod_chown
1370+
/memcheck/tests/freebsd/close_range
1371+
/memcheck/tests/freebsd/delete_sized_mismatch
13481372
/memcheck/tests/freebsd/errno_aligned_allocs
13491373
/memcheck/tests/freebsd/eventfd1
13501374
/memcheck/tests/freebsd/eventfd2
@@ -1357,6 +1381,8 @@
13571381
/memcheck/tests/freebsd/getfsstat
13581382
/memcheck/tests/freebsd/inlinfo
13591383
/memcheck/tests/freebsd/inlinfo_nested.so
1384+
/memcheck/tests/freebsd/kqueue
1385+
/memcheck/tests/freebsd/kqueuex
13601386
/memcheck/tests/freebsd/linkat
13611387
/memcheck/tests/freebsd/memalign
13621388
/memcheck/tests/freebsd/misc
@@ -1365,6 +1391,7 @@
13651391
/memcheck/tests/freebsd/revoke
13661392
/memcheck/tests/freebsd/scalar
13671393
/memcheck/tests/freebsd/scalar_13_plus
1394+
/memcheck/tests/freebsd/scalar_15_plus
13681395
/memcheck/tests/freebsd/scalar_abort2
13691396
/memcheck/tests/freebsd/scalar_fork
13701397
/memcheck/tests/freebsd/scalar_pdfork
@@ -1377,6 +1404,8 @@
13771404
/memcheck/tests/freebsd/stat
13781405
/memcheck/tests/freebsd/statfs
13791406
/memcheck/tests/freebsd/static_allocs
1407+
/memcheck/tests/freebsd/timerfd
1408+
/memcheck/tests/freebsd/timing_safe
13801409
/memcheck/tests/freebsd/utimens
13811410
/memcheck/tests/freebsd/utimes
13821411

@@ -1692,9 +1721,31 @@
16921721
/none/tests/amd64-solaris/syscall_return_args
16931722

16941723
# /none/tests/arm/
1724+
/none/tests/arm/*.stderr.diff
1725+
/none/tests/arm/*.stderr.out
1726+
/none/tests/arm/*.stdout.diff
1727+
/none/tests/arm/*.stdout.out
16951728
/none/tests/arm/.deps
16961729
/none/tests/arm/Makefile
16971730
/none/tests/arm/Makefile.in
1731+
/none/tests/arm/allexec
1732+
/none/tests/arm/intdiv
1733+
/none/tests/arm/ldrt
1734+
/none/tests/arm/ldrt_arm
1735+
/none/tests/arm/neon128
1736+
/none/tests/arm/neon64
1737+
/none/tests/arm/v6intARM
1738+
/none/tests/arm/v6intThumb
1739+
/none/tests/arm/v6media
1740+
/none/tests/arm/v8crypto_a
1741+
/none/tests/arm/v8crypto_t
1742+
/none/tests/arm/v8fpsimd_a
1743+
/none/tests/arm/v8fpsimd_t
1744+
/none/tests/arm/v8memory_a
1745+
/none/tests/arm/v8memory_t
1746+
/none/tests/arm/vcvt_fixed_float_VFP
1747+
/none/tests/arm/vfp
1748+
/none/tests/arm/vfpv4_fma
16981749

16991750
# /none/tests/arm64/
17001751
/none/tests/arm64/.deps

Makefile.tool.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ TOOL_LDFLAGS_ARM64_LINUX = \
7878
$(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@
7979

8080
TOOL_LDFLAGS_S390X_LINUX = \
81-
$(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@
81+
$(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ @FLAG_S390_PGSTE@
8282

8383
TOOL_LDFLAGS_X86_DARWIN = \
8484
$(TOOL_LDFLAGS_COMMON_DARWIN) -arch i386

NEWS

+51-1
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,39 @@ AMD64/macOS 10.13 and nanoMIPS/Linux.
1212

1313
* A new configure option --with-gdbscripts-dir lets you install
1414
the gdb valgrind python monitor scripts in a specific location.
15-
For example an distro could use it to install the scripts in a
15+
For example a distro could use it to install the scripts in a
1616
safe load location --with-gdbscripts-dir=%{_datadir}/gdb/auto-load
1717
It is also possible to configure --without-gdb-scripts-dir so no
1818
.debug_gdb_scripts section is added to the vgpreload library and
1919
no valgrind-monitor python scripts are installed at all.
2020

2121
* ================== PLATFORM CHANGES =================
2222

23+
* Support has been added for FreeBSD 14 and FreeBSD 15.
24+
* Add support for the folllowing FreeBSD system calls:
25+
close_range, kqueuex, membarrier, timerfd_create,
26+
timerfd_settime and timerfd_gettime (all added in FreeBSD 15).
2327

2428
* ==================== TOOL CHANGES ===================
2529

30+
* Memcheck now tests and warns about the values used for
31+
alignment and size. These apply to various functions: memalign,
32+
posix_memalign and aligned_alloc in C and various overloads
33+
of operators new and delete in C++. The kinds of error that can
34+
be detected are
35+
- invalid alignment, for instance the alignment is usually required
36+
to be a power of 2
37+
- mismatched alignment between aligned allocation and aligned
38+
deallocation
39+
- mismatched size when sized delete is used
40+
- bad size for functions that have implementation defined behaviour
41+
when the requested size is zero
42+
43+
* Cachegrind:
44+
- You can now profile part of a program's execution using the new
45+
`CACHEGRIND_START_INSTRUMENTATION` and `CACHEGRIND_STOP_INSTRUMENTATION`
46+
client requests, along with the new `--instr-at-start` option. The
47+
behaviour is the same as Callgrind's equivalent functionality.
2648

2749
* ==================== FIXED BUGS ====================
2850

@@ -33,21 +55,49 @@ bugzilla (https://bugs.kde.org/enter_bug.cgi?product=valgrind) rather
3355
than mailing the developers (or mailing lists) directly -- bugs that
3456
are not entered into bugzilla tend to get forgotten about or ignored.
3557

58+
390871 ELF debug info reader confused with multiple .rodata* sections
59+
426751 Valgrind reports "still reachable" memory using musl (alpine running inside docker)
60+
432801 Valgrind 3.16.1 reports a jump based on uninitialized memory somehow related to clang and signals
61+
433857 Add validation to C++17 aligned new/delete alignment size
62+
433859 Add mismatched detection to C++ 17 aligned new/delete
3663
460192 Add epoll_pwait2
64+
461074 DWARF2 CFI reader: unhandled DW_OP_ 0x11 (consts) DW_OP_ 0x92 (bregx)
65+
465782 s390x: Valgrind doesn't compile with Clang on s390x
66+
466105 aligned_alloc problems, part 2
67+
467441 Add mismatched detection to C++ 14 sized delete
3768
469049 link failure on ppc64 (big endian) valgrind 3.20
3869
469146 massif --ignore-fn does not ignore inlined functions
3970
469768 Make it possible to install gdb scripts in a different location
4071
470121 Can't run callgrind_control with valgrind 3.21.0 because of perl errors
72+
470132 s390x: Assertion failure on VGM instruction
4173
470520 Multiple realloc zero errors crash in MC_(eq_Error)
4274
470713 Failure on the Yosys project: valgrind: m_libcfile.c:1802
4375
(Bool vgPlain_realpath(const HChar *, HChar *)):
4476
Assertion 'resolved' failed
4577
470830 Don't print actions vgdb me ... continue for vgdb --multi mode
78+
470978 s390x: Valgrind cannot start qemu-kvm when "sysctl vm.allocate_pgste=0"
79+
471311 gdb --multi mode stdout redirecting to stderr
80+
471807 Add support for lazy reading and downloading of DWARF debuginfo
81+
472219 Syscall param ppoll(ufds.events) points to uninitialised byte(s)
82+
472875 none/tests/s390x/dfp-1 failure
83+
472963 Broken regular expression in configure.ac
84+
473604 Fix bug472219.c compile failure with Clang 16
85+
473677 make check compile failure with Clang 16 based on GCC 13.x
86+
473745 must-be-redirected function - strlen
87+
473870 FreeBSD 14 applications fail early at startup
88+
473944 Handle mold linker split RW PT_LOAD segments correctly
89+
474332 aligned_alloc under Valgrind returns nullptr when alignment is not a multiple of sizeof(void *)
90+
475650 DRD does not work with C11 threads
91+
475652 Missing suppression for __wcsncpy_avx2 (strncpy-avx2.S:308)?
92+
n-i-bz Allow arguments with spaces in .valgrindrc files
93+
n-i-bz FreeBSD fixed reading of Valgrind tools own debuginfo
4694

4795
To see details of a given bug, visit
4896
https://bugs.kde.org/show_bug.cgi?id=XXXXXX
4997
where XXXXXX is the bug number as listed above.
5098

99+
(3.22.0.RC1: 17 Oct 2023)
100+
51101
Release 3.21.0 (28 Apr 2023)
52102
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
53103

README.freebsd

+32-8
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,37 @@
11
Installing from ports or via pkg
22
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33

4-
If you are using FreeBSD 11.3 or later, then you should be able to install
5-
Valgrind using either
4+
You can install Valgrind using either
65

76
pkg install devel/valgrind
87

98
or alternatively from ports (if installed)
109

1110
cd /usr/ports/devel/valgrind && make install clean
1211

12+
devel/valgrind is updated with official releases of Valgrind, normally
13+
in April and October each year. There is an alternative port,
14+
devel/valgrind-devel which occasionally gets updated from the latest
15+
Valgrind source. If you want to have the latest port, check on
16+
https://www.freshports.org/ to see which is the most recent. If you
17+
want to have the very latest version, you will need to build a copy
18+
from source. See README for instructions on getting the source with git.
19+
1320

1421
Building Valgrind
1522
~~~~~~~~~~~~~~~~~
1623

17-
Install ports for autoconf, automake, libtool and gmake.
24+
Install ports for autotools, gmake and python.
1825

1926
$ sh autogen.sh
2027
$ ./configure --prefix=/where/ever
2128
$ gmake
2229
$ gmake install
2330

31+
If you are using a jail for building, make sure that it is configured so that
32+
"uname -r" returns a string that matches the pattern "XX.Y-*" where XX is the
33+
major version (12, 13, 14 ...) and Y is the minor version (0, 1, 2, 3).
34+
2435
Known Limitations (June 2022)
2536

2637
0. Be aware that if you use a wrapper script and run Valgrind on the wrapper
@@ -126,20 +137,33 @@ These are much easier.
126137

127138
They just contain a POST_MEM_WRITE macro for each output argument.
128139

129-
1. Running regression tests
140+
1. Frequent causes of problems
141+
142+
- New _umtx_op codes. Valgrind will print "WARNING: _umtx_op unsupported value".
143+
See syswrap-freebsd.c and add new cases for the new codes.
144+
- Additions to auxv. Depending on the entry it may need to be simply copied
145+
from the host to the guest, it may need to be modified for the guest or
146+
it may need to be ignored. See initimg-freebsd.c.
147+
- ELF PT_LOAD mappings. Either Valgrind will assert or there will be no source
148+
information in error reports. See VG_(di_notify_mmap) in debuginfo.c
149+
- Because they contain many deliberate errors the regression tests are prone
150+
to change with changes of compiler. Liberal use of 'volatile' and
151+
'-Wno-warning-flag' can help - see configure.ac
152+
153+
2. Running regression tests
130154

131155
In order to run all of the regression tests you will need to install
132156
the following packages
133157
gdb
134158
gsed
135159

136-
In addition to running "make" you will need to run
137-
"make check" to build the regression test exectutables
138-
and "make regtest". Again, more details can be seen in
160+
In addition to running "gmake" you will need to run
161+
"gmake check" to build the regression test exectutables
162+
and "gmake regtest". Again, more details can be seen in
139163
README_DEVELOPERS.
140164

141165
If you want to run the 'nightly' script (see nightly/README.txt)
142-
you will need to install coreutils and modify the
166+
you will need to install coreutils (for GNU cp) and modify the
143167
nightly/conf/freebsd.* files. The default configuration
144168
sends an e-mail to the valgrind-testresults mailing list.
145169

README_DEVELOPERS

+7
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,13 @@ A different and possibly easier way is as follows:
172172
will continue as normal. Note that comment (3) above re passing
173173
signals applies here too.
174174

175+
The default build of Valgrind uses "-g -O2". This is OK most of the
176+
time, but with sophisticated optimization it can be difficult to
177+
see the contents of variables. A quick way to get to see function
178+
variables is to temporarily add "__attribute__((optnone))" before
179+
the function definition and rebuild. Alternatively modify
180+
Makefile.all.am and remove -O2 from AM_CFLAGS_BASE. That will
181+
require you to reconfigure and rebuild Valgrind.
175182

176183
Self-hosting
177184
~~~~~~~~~~~~

0 commit comments

Comments
 (0)