Fix valgrind detection during configure script #2823
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A problem was noticed with some versions of OpenIndiana builders on NUT CI, where
valgrind
claimed thatstrchr (in /lib/ld.so.1)
jumped into anIllegal opcode
(or at least one that the tool did not recognize), and peppered the core dump location withmemcheck-x86-sol
cores for each run of NUT build since November 2024 or so:FWIW,
gdb
was not of much help:This was not seen to happen for other programs though, such as NUT ones under test. A closely related OmniOS (or older OI builds) also did not expose such mis-behavior.
In any case, this led to some investigation into the NUT
configure
script and found/fixed some issues by this PR:configure --with-valgrind=PROG
option was not well handled, setting the PROG after we tried (or not) to test the tool found in PATHtrue
implementation, if we can build and run a trivial program to same effect as the test forvalgrind
usability--with-valgrind=auto
by default (so try to detect the tool, then try to use it, but do not fail if either of those does not succeed)