mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 13:56:37 +00:00
fuzz: unpoison argc/argv in LLVMFuzzerInitialize under MSan #37047
No reviewers
Labels
No labels
Android
Backport
Block storage
Brainstorming
Bug
Build system
CI failed
Consensus
Data corruption
Descriptors
Docs
DrahtBot Guix build requested
Feature
Fuzzing
GUI
Good First Review
IPC
Insufficient Review
Kernel
Linux/Unix
Mempool
Mining
Needs Backport (31.x)
Needs Backport (32.x)
Needs Benchmark
Needs Conceptual Review
Needs backport (30.x)
Needs rebase
Needs release note
Net
P2P
PSBT
Privacy
Private Broadcast
Questions and Help
RPC/REST/ZMQ
Refactoring
Resource usage
Review club
Scripts and tools
Settings
TX fees and policy
Tests
Tracking Issue
UTXO Db and Indexes
Up for grabs
Upstream
Utils/log/libs
Validation
Waiting for author
Wallet
Windows
good first issue
interfaces
macOS
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin/bitcoin!37047
Loading…
Reference in a new issue
No description provided.
Delete branch "fuzz_msan_unpoison_argv"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
libFuzzer's
main()is not MSan-instrumented, which causes false positives.This causes a false-positiveuse-of-uninitialized-valueinSetArgs.This has been applied downstream in
oss-fuzzsince https://github.com/google/oss-fuzz/pull/16707. Do we want to apply it here, given the issue could be seen outside ofoss-fuzz?cc @maflcko
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
External sites
Reviews
See the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste
<!--meta-tag:bot-skip-->into the comment that the bot should ignore.Conflicts
Reviewers, this pull request conflicts with the following ones:
[[noreturn]]by fanquake)If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
I found no actionable issues in this static review.
Reviewed:
e4426584148c· Review report · Previous reportspermalink
🚧 At least one of the CI tasks failed.
Task
iwyu: https://github.com/bitcoin/bitcoin/actions/runs/46904405104/job/143542505286LLM reason (✨ experimental): intermittent_network: Docker image retrieval failed because mirror.gcr.io returned HTTP 429 after exceeding its Artifact Registry request quota.
Hints
Try to run the tests locally, according to the documentation. However, a CI failure may still
happen due to a number of reasons, for example:
Possibly due to a silent merge conflict (the changes in this pull request being
incompatible with the current code in the target branch). If so, make sure to rebase on the latest
commit of the target branch.
A sanitizer issue, which can only be found by compiling with the sanitizer and running the
affected test.
Intermittent network issues can occur; re-run CI for now, and report the issue if they keep happening.
A functional or integration test failure may be intermittent or unrelated to this pull request.
If no dedicated issue thread exists, create a new one to track it.
Leave a comment here, if you need help tracking down a confusing failure.
thx. Seems fine. Could revert https://github.com/bitcoin/bitcoin/pull/33666 to get back the 60s of empty fuzzing?
Though, ideally this is fixed upstream some time in the future in llvm in
github.com/llvm/llvm-project@932dda8e34/compiler-rt/lib/fuzzer/FuzzerDriver.cpp (L658), as this affects all projects where the main frame collides with poisoned stack bytes from early temp C++ static init stuff.Thanks. Pulled in a reversion.
thx. Though there is now a linker error.
review ACK
46a9b9ae9b🔷Show signature
Signature:
Yea, we can't do this cause the apt libfuzzer is built against libstdc++, which we've seen before. I'll drop the revert for now.
ok:
review ACK
e442658414🤜Show signature
Signature:
Opened https://github.com/google/oss-fuzz/pull/16733 downstream.
I guess we could build libfuzzer against libc++, like tsan, but I am not sure how tedious this is and whether this is worth it.
Opened #37091 for any opinions.
ralph referenced this pull request2026-12-03 11:27:28 +00:00
Backported to
32.xin #37052.