Skip to content

ci: use DWARF-4 for Valgrind jobs#24735

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

ci: use DWARF-4 for Valgrind jobs#24735
maflcko merged 2 commits intobitcoin:masterfrom
fanquake:remove_boost_valgrind

Conversation

@fanquake
Copy link
Member

@fanquake fanquake commented Apr 1, 2022

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
Copy link
Member

maflcko commented Apr 1, 2022

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
Copy link
Member Author

fanquake commented Apr 1, 2022

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
Copy link
Member

laanwj commented Apr 1, 2022

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
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
Copy link
Member Author

fanquake commented Apr 4, 2022

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
Copy link
Member Author

fanquake commented Apr 4, 2022

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.

fanquake added 2 commits April 4, 2022 10:39
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 building with GCC.

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

https://releases.llvm.org/14.0.0/tools/clang/docs/ReleaseNotes.html#dwarf-support-in-clang
https://www.gnu.org/software/gcc/gcc-11/changes.html
https://valgrind.org/docs/manual/dist.news.html
@fanquake fanquake force-pushed the remove_boost_valgrind branch from 951ddd3 to 15893a0 Compare April 4, 2022 09:57
Copy link
Member

@maflcko maflcko left a comment

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
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request 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