]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
5 years agoAdd ISA 3.1 VSX 32-byte Storage Access Operations
Will Schmidt [Mon, 22 Jun 2020 14:57:21 +0000 (09:57 -0500)] 
Add ISA 3.1 VSX 32-byte Storage Access Operations

Add support for the new ISA 3.1 load and store
instructions:

lxvpx Load VSX Vector Paired Indexed
plxvp Prefixed Load VSX Vector Paired
pstxvp Prefixed Store VSX Vector Paired
stxvpx Store VSX Vector Paired Indexed

Update the parsing of the lxvp and stxvp instructions that
were previously added.

lxvp Load VSX Vector Paired
stxvp Store VSX Vector Paired

A couple of format changes for the arguments to the
calculate_prefix_EA function.

Add comments to the else if and case statement to
clarify which instructions meet this condition.

5 years agoAdd ISA 3.1 Set Boolean Extension instruction support
Carl Love [Tue, 22 Sep 2020 17:30:43 +0000 (12:30 -0500)] 
Add ISA 3.1 Set Boolean Extension instruction support

Add support for the new ISA 3.1 set boolean condition
word instructions:

setbc Set Boolean Condition
setbcr Set Boolean Condition Reverse
setnbc Set Negative Boolean Condition
setnbcr Set Negative Boolean Condition Reverse.

5 years agoAdd ISA 3.1 Byte-Reverse Instruction support
Carl Love [Tue, 22 Sep 2020 17:25:14 +0000 (12:25 -0500)] 
Add ISA 3.1 Byte-Reverse Instruction support

Add support for the new ISA 3.1 word instructions:

brd Byte-Reverse Doubleword
brh Byte-Reverse Halfword
brw Byte-Reverse Word

5 years agoUpdate .gitignore with none/tests/amd64/rdseed
Mark Wielaard [Fri, 25 Sep 2020 19:21:35 +0000 (21:21 +0200)] 
Update .gitignore with none/tests/amd64/rdseed

5 years agoPPC64 tests Makefile.am cleanup
Carl Love [Fri, 25 Sep 2020 16:14:58 +0000 (11:14 -0500)] 
PPC64 tests Makefile.am cleanup

Fix the file consistency check in none/tests/ppc64/Makefile.am.  Subsequent
patches for the PPC ISA 3.1 support will fully add the additional tests.

5 years agoir_defs.c: Iop_MAddF32 and Iop_MSubF32 are no (longer) s390 specific.
Mark Wielaard [Thu, 10 Sep 2020 10:30:11 +0000 (12:30 +0200)] 
ir_defs.c: Iop_MAddF32 and Iop_MSubF32 are no (longer) s390 specific.

5 years agoVEX/priv/guest_arm64_toIR.c: Fix vpanic messages mixup in mkDIVF.
Mark Wielaard [Thu, 10 Sep 2020 10:28:57 +0000 (12:28 +0200)] 
VEX/priv/guest_arm64_toIR.c: Fix vpanic messages mixup in mkDIVF.

5 years agoFix isa 3.1 test code on ppc64.
Mark Wielaard [Wed, 23 Sep 2020 10:49:34 +0000 (12:49 +0200)] 
Fix isa 3.1 test code on ppc64.

On ppc64 [old big endian] altivec.h can not be included directly.
Move the HAS_ISA_3_1 guard around so the include is only done when
the full test (and test_list_t) are build.

5 years agoFix common isa 3.1 test code
Carl Love [Tue, 22 Sep 2020 23:57:14 +0000 (18:57 -0500)] 
Fix common isa 3.1 test code

The code in test_isa_3_1_common.c should only be included
if ISA 3.1 support exists.

5 years agoPrefixed load-store support
Carl Love [Mon, 21 Sep 2020 20:57:26 +0000 (15:57 -0500)] 
Prefixed load-store support

5 years agovalgrind isa 3.1 foundation
Carl Love [Mon, 21 Sep 2020 20:56:22 +0000 (15:56 -0500)] 
valgrind isa 3.1 foundation

header files and other common parts associated with the initial isa v3.1
support

5 years agoAdd prefixed support for the following word instructions.
Carl Love [Tue, 28 Jul 2020 18:17:18 +0000 (13:17 -0500)] 
Add prefixed support for the following word instructions.

addi    Add Immediate
lbz     Load Byte & Zero
ld      Load Doubleword
lfd     Load Floating Double
lfs     Load Floating Single
lha     Load Halfword Algebraic
lhz     Load Halfword & Zero
lq      Load Quadword
lwa     Load Word Algebraic
lwz     Load Word & Zero
lxsd    Load VSX Scalar Doubleword
lxssp   Load VSX Scalar Single-Precision
lxv     Load VSX Vector
stb     Store Byte
std     Store Doubleword
stfd    Store Floating Double
stfs    Store Floating Single
sth     Store Halfword
stq     Store Quadword
stw     Store Word
stxsd   Store VSX Scalar Doubleword
stxssp  Store VSX Scalar Single-Precision
stxv    Store VSX Vector

5 years agoInstruction Prefix Support
Carl Love [Wed, 6 May 2020 20:27:32 +0000 (15:27 -0500)] 
Instruction Prefix Support

5 years agoAdd check for isa 3.1 support
Carl Love [Wed, 6 May 2020 20:13:42 +0000 (15:13 -0500)] 
Add check for isa 3.1 support

5 years agodrd: Port to Fedora 33
Bart Van Assche [Sat, 19 Sep 2020 15:08:59 +0000 (08:08 -0700)] 
drd: Port to Fedora 33

Apparently on Fedora 33 the POSIX thread functions exist in both libc and
libpthread. Hence this patch that intercepts the pthread functions in
libc. See also https://bugs.kde.org/show_bug.cgi?id=426144 .

5 years agoOn amd64, use by default the expensive instrumentation scheme for Iop_Add32.
Julian Seward [Sat, 19 Sep 2020 10:09:54 +0000 (12:09 +0200)] 
On amd64, use by default the expensive instrumentation scheme for Iop_Add32.

This is necessary to avoid some false positives in code compiled by clang 10
at -O2.  Some very crude measurements suggest the increase in generated code
size is around 0.2%, viz, insignificant.

5 years agoBug 425820 - Failure to recognize vpcmpeqq as a dependency breaking idiom.
Julian Seward [Sat, 19 Sep 2020 10:05:26 +0000 (12:05 +0200)] 
Bug 425820 - Failure to recognize vpcmpeqq as a dependency breaking idiom.

In the IR optimiser (ir_opt.c): Recognise the following IROps as
dependency-breaking ops that generate an all-ones output: Iop_CmpEQ16x4
Iop_CmpEQ32x2 Iop_CmpEQ64x2 Iop_CmpEQ8x32 Iop_CmpEQ16x16 Iop_CmpEQ64x4.  I
think this fixes all the known cases for sizes 32 bits to 256 bits.  It also
fixes bug 425820.

5 years agoamd64: Implement RDSEED
Alexandra Hájková [Fri, 31 Jul 2020 11:19:16 +0000 (13:19 +0200)] 
amd64: Implement RDSEED

This commit implements amd64 RDSEED instruction, on hosts that have it
and adds the new test case - none/tests/amd64/rdseed based on the existing
rdrand support.

https://bugs.kde.org/show_bug.cgi?id=424298

5 years agoCorrect vpanic message in guest_arm64_toIR.c for mkABSF/mkSQRTF.
Mark Wielaard [Mon, 31 Aug 2020 10:25:43 +0000 (12:25 +0200)] 
Correct vpanic message in guest_arm64_toIR.c for mkABSF/mkSQRTF.

I didn't actually see these vpanics, so they might never trigger. But
both would vpanic as if for mkNEGF, which is clearly wrong and confusing.

5 years agoIncorrect call-graph tracking due to new _dl_runtime_resolve_xsave*
Mark Wielaard [Mon, 27 Jul 2020 20:43:28 +0000 (22:43 +0200)] 
Incorrect call-graph tracking due to new _dl_runtime_resolve_xsave*

Newer glibc have alternate ld.so _ld_runtime_resolve functions.
Namely _dl_runtime_resolve_xsave and _dl_runtime_resolve_xsavec

This patch recognizes the xsave, xsvec and fxsave variants and
changes callgrind so that any variant counts as _dl_runtime_resolve.

Original patch by paulo.cesar.pereira.de.andrade@gmail.com
https://bugs.kde.org/show_bug.cgi?id=415293

5 years agoFix epoll_ctl setting of array event and data fields.
Mark Wielaard [Tue, 18 Aug 2020 21:58:55 +0000 (23:58 +0200)] 
Fix epoll_ctl setting of array event and data fields.

Fix for https://bugs.kde.org/show_bug.cgi?id=422623 in commit ecf5ba119
epoll_ctl warns for uninitialized padding on non-amd64 64bit arches
contained a bug. A pointer to an array is not a pointer to a pointer to
an array. Found by a Fedora user:
https://bugzilla.redhat.com/show_bug.cgi?id=1844778#c10

5 years agoHandle REX prefixed JMP instruction.
Mark Wielaard [Sun, 26 Jul 2020 19:17:23 +0000 (21:17 +0200)] 
Handle REX prefixed JMP instruction.

The NET Core runtime might generate a JMP with a REX prefix.
For Jv (32bit offset) and Jb (8bit offset) this is valid.
Prefixes that change operand size are ignored for such JMPs.
So remove the check for sz == 4 and force sz = 4 for Jv.

https://bugs.kde.org/show_bug.cgi?id=422174

5 years agoFix warning in syswrap sched_getattr print format.
Philippe Waroquiers [Sat, 15 Aug 2020 14:54:14 +0000 (16:54 +0200)] 
Fix warning in syswrap sched_getattr print format.

m_syswrap/syswrap-linux.c:3716:10: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'RegWord' {aka 'long unsigned int'} [-Wformat=]

5 years agoDocument format of suppression files comment lines and blank lines.
Philippe Waroquiers [Sat, 15 Aug 2020 14:45:54 +0000 (16:45 +0200)] 
Document format of suppression files comment lines and blank lines.

Seems this was not documented.

5 years agoepoll_ctl warns for uninitialized padding on non-amd64 64bit arches
Mark Wielaard [Sun, 26 Jul 2020 20:40:22 +0000 (22:40 +0200)] 
epoll_ctl warns for uninitialized padding on non-amd64 64bit arches

struct vki_epoll_event is packed on x86_64, but not on other 64bit
arches. This means that on 64bit arches there can be padding in the
epoll_event struct. Seperately the data field is only used by user
space (which might not set the data field if it doesn't need to).

Only check the events field on epoll_ctl. But assume both events
and data are both written to by epoll_[p]wait (exclude padding).

https://bugs.kde.org/show_bug.cgi?id=422623

5 years agoHandle linux syscalls sched_getattr and sched_setattr
Mark Wielaard [Mon, 27 Jul 2020 14:36:17 +0000 (16:36 +0200)] 
Handle linux syscalls sched_getattr and sched_setattr

The only "special" thing about these syscalls is that the given
struct sched_attr determines its own size for future expansion.

Original fix by "ISHIKAWA,chiaki" <ishikawa@yk.rim.or.jp>

https://bugs.kde.org/show_bug.cgi?id=369029

5 years agoAdd armhf debian specific suppression to auxprogs/gsl-1.6.supp.
Mark Wielaard [Mon, 20 Jul 2020 09:35:42 +0000 (11:35 +0200)] 
Add armhf debian specific suppression to auxprogs/gsl-1.6.supp.

On debian armhf write goes through the __libc_do_syscall function.

5 years agoSmall fixes for new auxchecks target that runs GNU Scientific Library tests
Rhys Kidd [Fri, 3 Jul 2020 00:29:42 +0000 (10:29 +1000)] 
Small fixes for new auxchecks target that runs GNU Scientific Library tests

Fixes:
- Ensure proper slash is present in default folder path: auxprogs/auxchecks.
- Ensure intermediate build artifacts aren't accidentally committed to git.

Fixes: 5efd866df ("Add new auxchecks target that runs GNU Scientific Library tests.")
5 years agoAdd new auxchecks target that runs GNU Scientific Library tests.
Mark Wielaard [Tue, 30 Jun 2020 15:51:49 +0000 (17:51 +0200)] 
Add new auxchecks target that runs GNU Scientific Library tests.

Replace the gsl16test script under auxprogs that you run by hand
with a new make target auxchecks which fetches the source code,
patches, reconfigures and builds all tests. Then run all tests
under valgrind.

5 years agoupdate .gitignore with new docs/valid-* targets
Rhys Kidd [Thu, 2 Jul 2020 09:13:58 +0000 (19:13 +1000)] 
update .gitignore with new docs/valid-* targets

Fixes: 4facc497b ("doc/Makefile.am: Turn valid-manual and valid-manpages into real targets")
5 years agoBugzilla 423021 - PPC: Add missing ISA 3.0 documentation link and HWCAPS test.
Carl Love [Mon, 15 Jun 2020 16:31:16 +0000 (11:31 -0500)] 
Bugzilla 423021 - PPC: Add missing ISA 3.0 documentation link and HWCAPS test.

Add the check for the PPC_FEATURE2_ARCH_3_00 setting in the HWCAP2 string.

Add the information on where to find the public IBM ISA 3.0B document.

5 years agoUpdate NEWS following the fix of #422715.
Julian Seward [Thu, 11 Jun 2020 07:07:52 +0000 (09:07 +0200)] 
Update NEWS following the fix of #422715.

5 years agoexpr_is_guardable, stmt_is_guardable, add_guarded_stmt_to_end_of: handle GetI/PutI...
Julian Seward [Thu, 11 Jun 2020 07:01:52 +0000 (09:01 +0200)] 
expr_is_guardable, stmt_is_guardable, add_guarded_stmt_to_end_of: handle GetI/PutI cases.

This fixes #422715.

5 years agoPower PC Fix extraction of the L field for sync instruction
Carl Love [Tue, 9 Jun 2020 15:42:03 +0000 (10:42 -0500)] 
Power PC Fix extraction of the L field for sync instruction

The L field is currently a two bit[22:21] field in ISA 3.0. The size of the
L field has changed over time.

Currently the ISA 3.0 Valgrind sync instruction support code sets the
flag_L for the instruction L field to a five bit value that includes bits
that are marked reserved the sync instruction.  This patch fixes the issue for ISA 3.0
to only setting flag_L the specified two bits.

Valgrind bugzilla:   https://bugs.kde.org/show_bug.cgi?id=422677

5 years agodocs: Always generate UTF-8 encoding
Mark Wielaard [Tue, 9 Jun 2020 10:59:40 +0000 (12:59 +0200)] 
docs: Always generate UTF-8 encoding

5 years agodocs: Make sure all elements that need it have an id tag.
Mark Wielaard [Tue, 9 Jun 2020 09:23:46 +0000 (11:23 +0200)] 
docs: Make sure all elements that need it have an id tag.

When generating HTML it is useful if every element that can be referenced
has a stable id. If it doesn't a random one is generated which makes it
harder to link to parts of the manual on the website. It also generates
spurious diffs. Explicitly add an id tag for the sect2 and sect3 elements
in dh-manual, a unique id for each legalnotice element and for each
FAQ question and answer.

5 years agoAdd execveat for arm[64], [nano]mips[32|64], ppc[32|64], s390x and x86.
Mark Wielaard [Tue, 9 Jun 2020 07:02:51 +0000 (09:02 +0200)] 
Add execveat for arm[64], [nano]mips[32|64], ppc[32|64], s390x and x86.

https://bugs.kde.org/show_bug.cgi?id=345077

5 years agoAdvance the head to 3.17.0.GIT.
Mark Wielaard [Mon, 8 Jun 2020 19:12:39 +0000 (21:12 +0200)] 
Advance the head to 3.17.0.GIT.

5 years agoAdd support for execveat syscall
Alexandra Hájková [Thu, 9 Apr 2020 15:28:18 +0000 (17:28 +0200)] 
Add support for execveat syscall

Refactor the code to be reusable between execve and
execveat syscalls.

https://bugs.kde.org/show_bug.cgi?id=345077

5 years agoPrepare NEWS for 3.17.0
Mark Wielaard [Mon, 8 Jun 2020 17:52:02 +0000 (19:52 +0200)] 
Prepare NEWS for 3.17.0

5 years ago-> 3.16.0 final
Julian Seward [Mon, 8 Jun 2020 05:32:19 +0000 (07:32 +0200)] 
-> 3.16.0 final

(cherry picked from commit 108b4a0880bc04f9db6133f79a8e4a98dcfc0cd0)

5 years ago-> 3.16.0.RC2
Julian Seward [Tue, 19 May 2020 12:33:31 +0000 (14:33 +0200)] 
-> 3.16.0.RC2

(cherry picked from commit bf5e647edb9e96cbd5c57cc944984402eeee296d)

5 years agodoc/Makefile.am: Turn valid-manual and valid-manpages into real targets
Mark Wielaard [Mon, 8 Jun 2020 13:14:04 +0000 (15:14 +0200)] 
doc/Makefile.am: Turn valid-manual and valid-manpages into real targets

Make valid-manual and valid-manpages real, separate make targets.
This means they can be run in parallel and they will only be run
once when doing make check, unless one of the manual and manpages
files has been touched.

5 years agodrd/tests/tsan_unittest.cpp: Fix array CHECK
Mark Wielaard [Mon, 8 Jun 2020 11:36:11 +0000 (13:36 +0200)] 
drd/tests/tsan_unittest.cpp: Fix array CHECK

Use == equality, not = assignment, for CHECK.

5 years agoguest_ppc_toIR: Call vpanic not just vex_printf when the impossible happens
Mark Wielaard [Mon, 8 Jun 2020 11:27:28 +0000 (13:27 +0200)] 
guest_ppc_toIR: Call vpanic not just vex_printf when the impossible happens

is_Zero_Vector, is_Denorm_Vector, is_NaN_Vector and negate_Vector
only handle an Ity_I32 element size. And that is also what they are
currently being called with. In case they would ever be called with
a different element_size they would simply vex_printf and continue
(producing bogus/impossible results). To make this a bit more future
proof (and to silence a static analyzer) vpanic instead.

5 years agohelgrind: If hg_cli__realloc fails, return NULL.
Mark Wielaard [Mon, 8 Jun 2020 11:24:47 +0000 (13:24 +0200)] 
helgrind: If hg_cli__realloc fails, return NULL.

helgrind would not handle a failing realloc correctly and assume
cli_malloc would always succeed. If cli_malloc fails in hg_cli__realloc
do like dh and massif and fail the realloc call by returning NULL.

5 years agomips: remove rt-rk email that is no longer in use
Petar Jovanovic [Wed, 20 May 2020 13:18:55 +0000 (13:18 +0000)] 
mips: remove rt-rk email that is no longer in use

Email mips-valgrind@rt-rk.com is no longer in use.

5 years ago-> 3.16.0.RC1
Julian Seward [Mon, 18 May 2020 16:50:27 +0000 (18:50 +0200)] 
-> 3.16.0.RC1

5 years agoEnable v8.1 atomics and fix SWP and LDUMAX instructions.
Assad Hashmi [Fri, 15 May 2020 14:44:14 +0000 (16:44 +0200)] 
Enable v8.1 atomics and fix SWP and LDUMAX instructions.

The atomics test drd/tests/std_mutex hangs on Arm v8.1 when built
with GCC10. Add HWCAP_ATOMICS to ARM64_SUPPORTED_HWCAP and fix the
ldumax and swp instructions to make it work.

https://bugs.kde.org/show_bug.cgi?id=421570

5 years agogcc10 arm64 build needs __getauxval for linking with libgcc
Mark Wielaard [Tue, 12 May 2020 14:58:36 +0000 (16:58 +0200)] 
gcc10 arm64 build needs __getauxval for linking with libgcc

Provide a new library libgcc-sup-<platform>.a that contains symbols
needed by libgcc. This needs to be linked after -lgcc to provide
any symbols missing which would normally be provided by glibc.
At the moment this only provides __getauxval on arm64 linux.

https://bugs.kde.org/show_bug.cgi?id=421321

5 years agoExplicitly set stylesheet to use with xmlto.
Mark Wielaard [Fri, 15 May 2020 10:30:00 +0000 (12:30 +0200)] 
Explicitly set stylesheet to use with xmlto.

5 years agoMove to xmlto with fop for print-docs.
Mark Wielaard [Thu, 14 May 2020 20:45:30 +0000 (22:45 +0200)] 
Move to xmlto with fop for print-docs.

Default to using fop for pdf generation.
pdfxmltex is known to be broken by default.
xmlto can also use pdfxmltex or dblatex if available.

5 years agoRun xmllint on make check.
Mark Wielaard [Thu, 14 May 2020 22:43:33 +0000 (00:43 +0200)] 
Run xmllint on make check.

Now that we have valid docbookx xml lets try to keep it that way.
If the user has xmllint installed then run it on make check.

5 years agoSet refmiscinfo class to version in all manpages.
Mark Wielaard [Thu, 14 May 2020 17:11:22 +0000 (19:11 +0200)] 
Set refmiscinfo class to version in all manpages.

Otherwise xsltproc will complain while producing the manpage that
it doesn't know how to interpret the release string.

5 years agoResolve id conflicts in See Also sections in valgrind and vgdb manpages.
Mark Wielaard [Thu, 14 May 2020 16:47:57 +0000 (18:47 +0200)] 
Resolve id conflicts in See Also sections in valgrind and vgdb manpages.

Because the manpages are processed together they cannot contain the
same ids. Both the valgrind and vgdb manpage reference the vgdb main
manual URL. That conflicts even though the valgrind.1 and vgdb.1 manual
page are separate. Prefixing the vgdb ids (with "vgdb-") works around
the conflict. It still works fine, since in vgdb the references are only
directly used in the "See Also" refsect. The labels and urls still come
out as intended.

With this fix make valid validates both the manual index.xml and
manpages-index.xml without errors.

5 years agoMake Execution Trees references available in both manual and man pages.
Mark Wielaard [Thu, 14 May 2020 15:50:40 +0000 (17:50 +0200)] 
Make Execution Trees references available in both manual and man pages.

Both the manual and the man pages reference xtrees. Create some shared
entities so both can reference the section.

5 years agoTurn manpages-index.xml into a "real" book, so it can be validated.
Mark Wielaard [Thu, 14 May 2020 14:07:04 +0000 (16:07 +0200)] 
Turn manpages-index.xml into a "real" book, so it can be validated.

manpages-index.xml is just to easily get at each individual man page
with xsltproc. It wasn't a complete docbookx xml file. Now that it is
we can validate it with xmllint. It doesn't fully validate, but we
are close.

5 years agoUse DTD DocBook XML V4.5 everywhere.
Mark Wielaard [Thu, 14 May 2020 13:11:56 +0000 (15:11 +0200)] 
Use DTD DocBook XML V4.5 everywhere.

This makes the rule for xmllint easier since it doesn't need to
override the DTD to validate against. It also helps with other tools
tryinf to process the docbookx xml files.

5 years agoUpdate README_DEVELOPERS and references to --vex-guest-chase-thresh.
Mark Wielaard [Thu, 14 May 2020 10:54:23 +0000 (12:54 +0200)] 
Update README_DEVELOPERS and references to --vex-guest-chase-thresh.

Add a hint about using lldb in README_DEVELOPERS and fix any old references
to --vex-guest-chase-thresh=0 to --vex-guest-chase=no (mirroring the change
in commit 56e04256a "Rationalise --vex-guest* flags in the new IRSB
construction framework".

Reported-by: Paul FLOYD <pjfloyd@wanadoo.fr>
5 years agodocbook xml doesn't allow xref inside option, use link instead
Mark Wielaard [Thu, 14 May 2020 10:43:39 +0000 (12:43 +0200)] 
docbook xml doesn't allow xref inside option, use link instead

5 years agocl-manual.xml: xref cannot be used inside computeroutput, use link.
Mark Wielaard [Wed, 13 May 2020 22:53:16 +0000 (00:53 +0200)] 
cl-manual.xml: xref cannot be used inside computeroutput, use link.

5 years agoms_print-manpage.xml: date is not a valid tag inside refmeta.
Mark Wielaard [Wed, 13 May 2020 22:48:34 +0000 (00:48 +0200)] 
ms_print-manpage.xml: date is not a valid tag inside refmeta.

5 years agodrd-manual.xml: C++ isn't a valid id syntax, use CXX instead.
Mark Wielaard [Wed, 13 May 2020 22:38:27 +0000 (00:38 +0200)] 
drd-manual.xml: C++ isn't a valid id syntax, use CXX instead.

5 years agonl-manual.xml: Use unique nl-manual.overview as id, not ms-manual.overview.
Mark Wielaard [Wed, 13 May 2020 21:51:52 +0000 (23:51 +0200)] 
nl-manual.xml: Use unique nl-manual.overview as id, not ms-manual.overview.

5 years agoDon't use similar ids for varlistentry in cg-manual and cl-manual.
Mark Wielaard [Wed, 13 May 2020 21:39:40 +0000 (23:39 +0200)] 
Don't use similar ids for varlistentry in cg-manual and cl-manual.

5 years agocg-manual.xml: Use cg-manual.forkingprograms id, not ms-manual.
Mark Wielaard [Wed, 13 May 2020 14:50:21 +0000 (16:50 +0200)] 
cg-manual.xml: Use cg-manual.forkingprograms id, not ms-manual.

5 years agodh-manual.xml: Don't use computeroutput in title.
Mark Wielaard [Wed, 13 May 2020 14:43:41 +0000 (16:43 +0200)] 
dh-manual.xml: Don't use computeroutput in title.

It seems legal docbook, but it crashes our xsltproc/pdfxmltex toolchain.

5 years agodh-manual.xml: Put stray text before graphic in a para.
Mark Wielaard [Wed, 13 May 2020 13:52:32 +0000 (15:52 +0200)] 
dh-manual.xml: Put stray text before graphic in a para.

5 years agoms-manual.xml: Put stray ':' inside para.
Mark Wielaard [Wed, 13 May 2020 13:49:31 +0000 (15:49 +0200)] 
ms-manual.xml: Put stray ':' inside para.

5 years agomanual-core-adv.xml: listitems contain paras, not plain CDATA.
Mark Wielaard [Wed, 13 May 2020 13:46:16 +0000 (15:46 +0200)] 
manual-core-adv.xml: listitems contain paras, not plain CDATA.

5 years agomanual-core.xml: Fix various xmllint issues.
Mark Wielaard [Wed, 13 May 2020 13:37:13 +0000 (15:37 +0200)] 
manual-core.xml: Fix various xmllint issues.

Wrap bare CDATA text in a para and make sure that all listitems contain
paras.

5 years agovalgrind-manpage.xml: arg cannot contain a program, use replaceable.
Mark Wielaard [Wed, 13 May 2020 13:27:57 +0000 (15:27 +0200)] 
valgrind-manpage.xml: arg cannot contain a program, use replaceable.

5 years agohg-manual.xml: listitems contain paras, not CDATA.
Mark Wielaard [Wed, 13 May 2020 13:26:53 +0000 (15:26 +0200)] 
hg-manual.xml: listitems contain paras, not CDATA.

5 years agomc-manual.xml: varlistentries cannot contain paras, listitems do.
Mark Wielaard [Wed, 13 May 2020 13:24:31 +0000 (15:24 +0200)] 
mc-manual.xml: varlistentries cannot contain paras, listitems do.

5 years agodh-manual.xml: Remove duplicate dh-manual.options id.
Mark Wielaard [Wed, 13 May 2020 13:13:18 +0000 (15:13 +0200)] 
dh-manual.xml: Remove duplicate dh-manual.options id.

Rename one to dh-manual.realloc.

5 years agoMake manual-writing-tools.xml xmllint clean.
Mark Wielaard [Wed, 13 May 2020 12:08:19 +0000 (14:08 +0200)] 
Make manual-writing-tools.xml xmllint clean.

5 years agoMake FAQ.xml xmllint clean.
Mark Wielaard [Wed, 13 May 2020 12:03:27 +0000 (14:03 +0200)] 
Make FAQ.xml xmllint clean.

5 years agoFix reads and writes counts in DHAT.
Nicholas Nethercote [Thu, 7 May 2020 01:50:55 +0000 (11:50 +1000)] 
Fix reads and writes counts in DHAT.

If you do `malloc(100)` followed by `realloc(200)`, DHAT now adds 100
bytes to the read and write counts for the implicit `memcpy`. This gives
more reasonable results.

I have long been surprised by low writes-per-byte values of around 0.35
for vectors that are grown by doubling. Counting the implicit `memcpy`
increases those numbers to well above 0.5, which is what you'd expect.

The commit also adds a section to the DHAT docs about `realloc`, because
there is some non-obvious behaviour, some of which confused me just a
couple of days ago.

5 years agoSome further refinement to outer suppressions
Philippe Waroquiers [Sat, 2 May 2020 18:18:06 +0000 (20:18 +0200)] 
Some further refinement to outer suppressions

5 years agoUpdate the 'inner outer' suppression entries
Philippe Waroquiers [Sat, 2 May 2020 15:07:00 +0000 (17:07 +0200)] 
Update the 'inner outer' suppression entries

5 years agoRemove SGcheck from documentation.
Mark Wielaard [Sat, 2 May 2020 14:21:44 +0000 (16:21 +0200)] 
Remove SGcheck from documentation.

Since the SGcheck tool was removed for 3.16.0, also remove it from the
manual intro and core sections and the xml-output-protocol4 description.

5 years agoMention exp-sgcheck removal in NEWS.
Mark Wielaard [Sat, 2 May 2020 14:12:21 +0000 (16:12 +0200)] 
Mention exp-sgcheck removal in NEWS.

5 years agoRemove exp-sgcheck from .gitignore.
Mark Wielaard [Sat, 2 May 2020 13:52:43 +0000 (15:52 +0200)] 
Remove exp-sgcheck from .gitignore.

commit 40187fcd6 removed the exp-sgcheck tool.
Also remove it from .gitignore.

Reported-by: Paul FLOYD <pjfloyd@wanadoo.fr>
5 years agoUpdate NEWS.
Julian Seward [Thu, 30 Apr 2020 08:02:55 +0000 (10:02 +0200)] 
Update NEWS.

5 years agoAdd support for setns syscall
Michal Privoznik [Fri, 15 Nov 2019 09:37:53 +0000 (10:37 +0100)] 
Add support for setns syscall

I've tested this on amd64 and arm but I'm enabling it on all
arches since the syscall should work identically on all of them.

This was requested by users for a long time (almost 5 years) and
in fact, some programs (like libvirt) use namespaces and fork off
to enter other namespaces. Lack of implementation means valgrind
can't be used with these programs (or their configuration must be
changed to not use namespaces, which defeats the purpose).

Without knowing it, I've converged to same patch as mentioned in
bugs below.

https://bugs.kde.org/show_bug.cgi?id=343099
https://bugs.kde.org/show_bug.cgi?id=368923
https://bugs.kde.org/show_bug.cgi?id=369031

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoNEWS: Mention the MinGW include/valgrind.h fix
Bart Van Assche [Mon, 27 Apr 2020 18:57:21 +0000 (11:57 -0700)] 
NEWS: Mention the MinGW include/valgrind.h fix

5 years agomingw: Fix arch detection ifdefs for non-x86 mingw platforms
Martin Storsjö [Mon, 27 Apr 2020 18:31:51 +0000 (21:31 +0300)] 
mingw: Fix arch detection ifdefs for non-x86 mingw platforms

Don't assume that __MINGW32__ implies x86; Windows runs on ARM/ARM64
as well, and there are mingw toolchains that target those architectures.

This mirrors how the MSVC parts of the same expressions are written,
as (defined(_WIN32) && defined(_M_IX86)) and
(defined(_WIN64) && defined(_M_X64)) - not relying on _WIN32/_WIN64
or __MINGW32__/__MINGW64__ alone to indicate architecture.

Change the __MINGW64__ and _WIN64 ifdefs into plain __MINGW32__
and _WIN32 as well, for clarity - these defines mostly imply
platform.

5 years agoDo not fix '417075 - pwritev(vector[...]) suppression ignored' but produce a warning.
Philippe Waroquiers [Thu, 23 Apr 2020 19:30:05 +0000 (21:30 +0200)] 
Do not fix '417075 - pwritev(vector[...]) suppression ignored' but produce a warning.

  - The release 3.15 introduced a backward incompatible change for
    some suppression entries related to preadv and pwritev syscalls.
    When reading a suppression entry using the unsupported 3.14 format,
    valgrind will now produce a warning to say the suppression entry will not
    work, and suggest the needed change.
For example, in 3.14, the extra line was:
  pwritev(vector[...])
while in 3.15, it became e.g.
  pwritev(vector[2])

3 possible fixes were discussed:
 * revert the 3.15 change to go back to 3.14 format.
   This is ugly because valgrind 3.16 would be incompatible
   with the supp entries for 3.15.
 * make the suppression matching logic consider that ... is a wildcard
   equivalent to a *.
   This is ugly because the suppression matching logic/functionality
   is already very complex, and ... would mean 2 different things
   in a suppression entry: wildcard in the extra line, and whatever
   nr of stackframes in the backtrace portion of the supp entry.
 * keep the 3.15 format, and accept the incompatibility with 3.14 and before.
   This is ugly as valgrind 3.16 and above are still incompatible with 3.14
   and before.

The third option was deemed the less ugly, in particular because it was possible
to detect the incompatible unsupported supp entry and produce a warning.

So, now, valgrind reports a warning when such an entry is detected, giving
e.g. a behaviour such as:

==21717== WARNING: pwritev(vector[...]) is an obsolete suppression line not supported in valgrind 3.15 or later.
==21717== You should replace [...] by a specific index such as [0] or [1] or [2] or similar
==21717==
....
==21717== Syscall param pwritev(vector[1]) points to unaddressable byte(s)
==21717==    at 0x495B65A: pwritev (pwritev64.c:30)
==21717==    by 0x1096C5: main (sys-preadv_pwritev.c:69)
==21717==  Address 0xffffffffffffffff is not stack'd, malloc'd or (recently) free'd
So, we can hope that users having incompatible entries will easily understand
the problem of the supp entry not matching anymore.

In future releases of valgrind, we must take care to:
  * never change the extra string produced for an error, unless *really* necessary
  * minimise as much as possible 'variable' information generated dynamically
    in error extra string.  Such extra information can be reported in the rest
    of the error message (like the address above for example).
    The user can use e.g. GDB + vgdb to examine in details the offending
    data or parameter values or uninitialised bytes or ...

A comment is added in pub_tool_errormgr.h to remind tool developers of the above.

5 years agoAmend the recent update to VG_(getrlimit) and VG_(setrlimit)
Petar Jovanovic [Thu, 23 Apr 2020 16:42:26 +0000 (16:42 +0000)] 
Amend the recent update to VG_(getrlimit) and VG_(setrlimit)

[get|set]rlimit system calls are becoming deprecated.
Coregrind should use prlimit64 as the first candidate in order to
achieve "rlimit" functionality.

There are also systems that do not even support older "rlimits".

Modify the previously added support VG_(getrlimit) and VG_(setrlimit)
using __NR_prlimit64 by making it similar to the glibc implementation.

It fixes none/tests/stackgrowth and none/tests/sigstackgrowth
tests on nanoMIPS.

Patch by: Stefan Maksimovic and Aleksandar Rikalo

This patch resolves KDE #416285.

5 years agoMake memcheck/tests/linux/sigqueue usable with musl
Aleksandar Rikalo [Thu, 23 Apr 2020 16:31:50 +0000 (16:31 +0000)] 
Make memcheck/tests/linux/sigqueue usable with musl

Remove offsetof(siginfo_t, _sifields) from the test.
"_sifields" is not a mandatory field of struct siginfo_t so
it should not be used in regular user program.

This patch resolves KDE #417266.

5 years agoMusl issues: Fix none/tests/pth_atfork1.c
Aleksandar Rikalo [Thu, 23 Apr 2020 16:22:31 +0000 (16:22 +0000)] 
Musl issues: Fix none/tests/pth_atfork1.c

There is no error.h on some systems.

5 years agomips: fix helgrind/tests/annotate_hbefore for nanoMIPS
Aleksandar Rikalo [Fri, 17 Apr 2020 18:38:11 +0000 (18:38 +0000)] 
mips: fix helgrind/tests/annotate_hbefore for nanoMIPS

Implement do_acasW() function for nanoMIPS.

5 years agomips: support Ico_U1 in extractConst() for nanoMIPS
Aleksandar Rikalo [Fri, 17 Apr 2020 18:31:42 +0000 (18:31 +0000)] 
mips: support Ico_U1 in extractConst() for nanoMIPS

Add missing case in extractConst().

It fixes Memcheck chrashing on nanoMIPS.

5 years agoFix memcheck/vbit-test for BE platforms
Aleksandar Rikalo [Fri, 17 Apr 2020 18:22:38 +0000 (18:22 +0000)] 
Fix memcheck/vbit-test for BE platforms

We do not need u1 member of bits union as long as we use u32 for the same
purpose. Overlapping uint8_t with uint32_t causes a problem on BE platforms,
since LSB of u32 is not overlap with u1.

5 years agoupdate NEWS with fix for #417187
Petar Jovanovic [Fri, 17 Apr 2020 18:11:16 +0000 (18:11 +0000)] 
update NEWS with fix for #417187

The KDE issue #417187 has been fixed in

  commit 8bd259eb14d884009e2e51e6ad5834c06d193e17
  mips: update VEX to support speculative conditional branching

  commit ddc311558e11c47a06ba996a7d075b336726fc0b
  mips: treat delay slot as part of the previous instruction

5 years agomips: add a special case for beq r0, r0, imm
Stefan Maksimovic [Fri, 17 Apr 2020 18:05:20 +0000 (18:05 +0000)] 
mips: add a special case for beq r0, r0, imm

This results in unconditional PUTs to PC in generated IR code.

This fixes:

    memcheck/tests/cdebug_zlib
    memcheck/tests/cdebug_zlib_gnu
    memcheck/tests/origin2-not-quite
    memcheck/tests/origin5-bz2
    none/tests/mips64/branch_and_jump_instructions

5 years agomips: update VEX to support speculative conditional branching
Petar Jovanovic [Fri, 17 Apr 2020 18:02:39 +0000 (18:02 +0000)] 
mips: update VEX to support speculative conditional branching

This partially fixes KDE #417187.

5 years agomips: treat delay slot as part of the previous instruction
Stefan Maksimovic [Fri, 17 Apr 2020 17:54:58 +0000 (17:54 +0000)] 
mips: treat delay slot as part of the previous instruction

Do so by recursively calling disInstr_MIPS_WRK() if the instruction
currently being disassembled is a branch/jump, effectively combining them
into one IR instruction.

A notable change is that the branch/jump + delay slot combination now forms
an eight-byte instruction.

This is related to KDE #417187.

This fixes drd/tests/annotate_hbefore on mips.

5 years agoRemove the exp-sgcheck tool.
Julian Seward [Fri, 17 Apr 2020 17:23:26 +0000 (19:23 +0200)] 
Remove the exp-sgcheck tool.

It only ever worked on x86 and amd64, and even on those it had a high false
positive rate and was slow.  Everything it does, ASan can do faster, better,
and on more architectures.  So there's no reason to keep this tool any more.

5 years agoAdd avx_tests.h to noinst_HEADERS to make sure it appears in dist.
Mark Wielaard [Fri, 17 Apr 2020 14:29:11 +0000 (16:29 +0200)] 
Add avx_tests.h to noinst_HEADERS to make sure it appears in dist.