Skip to content

ci: use DWARF-4 for Valgrind jobs - #24735

Merged
maflcko merged 2 commits into
bitcoin:masterfrom
fanquake:remove_boost_valgrind
Apr 4, 2022
Merged

maflcko merged 2 commits into
bitcoin:masterfrom
fanquake:remove_boost_valgrind

Conversation

@fanquake

@fanquake fanquake commented Apr 1, 2022

Copy link
Copy Markdown
Member

clang-14 defaults to using DWARF-5, which breaks vlagrinds (3.18) ability
to parse debug info. Valgrind claims to support DWARF-5 from version
3.18 onwards, but maybe that only works when compiling with GCC.

Explicitly use DWARF-4 for now. Note that from 11.0 GCC also defaults to
using DWARF-5
.

Also remove a Boost related suppression.

@fanquake fanquake added the Tests label Apr 1, 2022
@maflcko

maflcko commented Apr 1, 2022

Copy link
Copy Markdown
Member

No objection, but it would be good for either clang or valgrind to fix this, so that we can revert the workaround and that devs are able to use clang-14 out of the box.

@fanquake

fanquake commented Apr 1, 2022

Copy link
Copy Markdown
Member Author

Looks like there is at least discussion on the Valgrind mailing list [Valgrind-users] does Valgrind-3.19.0.GIT support Clang14 dwarf 5?. I haven't found anything on the LLVM side yet.

@laanwj

laanwj commented Apr 1, 2022

Copy link
Copy Markdown
Member

I don't know how big of a change it is, but if it's anything like going from DWARF 2 to 3 it's not going to be a trivial change in valgrind. I suspect it's going to take a while to support it.

Could add a comment to mention why this override is needed and what would be the condition to remove it.

Otherwise code review ACK 5691a8f0ec8d0bfc470990dfaed9d230346a116e

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could leave CXXFLAGS untouched to minimize the effective changes?

Suggested change
export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer CC=clang CXX=clang++ CXXFLAGS='-fdebug-default-version=4'"
# Temporarily pin dwarf 4, until valgrind can understand clang's dwarf 5
export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer CC=clang CXX='clang++ -fdebug-default-version=4'"

@fanquake
fanquake force-pushed the remove_boost_valgrind branch from 5691a8f to b1ac3aa Compare April 4, 2022 08:28
@fanquake

fanquake commented Apr 4, 2022

Copy link
Copy Markdown
Member Author

Could add a comment to mention why this override is needed and what would be the condition to remove it.

Added.

Could leave CXXFLAGS untouched to minimize the effective changes?

Done. Used -gdwarf-4 to minimize even further.

@fanquake
fanquake marked this pull request as draft April 4, 2022 08:39
@fanquake
fanquake force-pushed the remove_boost_valgrind branch from b1ac3aa to 951ddd3 Compare April 4, 2022 09:27
@fanquake
fanquake marked this pull request as ready for review April 4, 2022 09:27
@fanquake

fanquake commented Apr 4, 2022

Copy link
Copy Markdown
Member Author

This actually only seems to work when using CXXFLAGS and the full -fdebug-default-version=4, so I've reverted back to the original change + the comment.

Comment thread ci/test/00_setup_env_native_valgrind.sh Resolved
@fanquake
fanquake force-pushed the remove_boost_valgrind branch from 951ddd3 to 15893a0 Compare April 4, 2022 09:57

@maflcko maflcko left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

review ACK

@maflcko
maflcko merged commit 67dc002 into bitcoin:master Apr 4, 2022
@bitcoin bitcoin locked and limited conversation to collaborators Apr 4, 2023
@fanquake
fanquake deleted the remove_boost_valgrind branch May 26, 2023 16:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants