Repository navigation
Add MSan support for fibers - #101621
Add MSan support for fibers#101621
Conversation
|
Workflow [PR], commit [6714d1f] Summary: ✅ AI ReviewSummaryThis PR updates Missing context
ClickHouse Rules
Final Verdict
|
Though the example from LLVM clearly reproduce a bug, though it has manual assertion - https://github.com/llvm/llvm-project/blob/main/compiler-rt/test/msan/Linux/swapcontext_annotation.cpp |
|
Though actually I'm not sure that this will fix the problem |
|
The Stress test (arm_msan) failure is fixed by #101239, which should be merged first. After it is merged, please update the branch to include the fix. |
LLVM Coverage Report
Changed lines: 100.00% (3/3) · Uncovered code |
|
This is still a good change, but unlikely this will help with MSan, but, let's at least try |
|
Thanks, this is much cleaner. |
|
It does not make sense to revert it completely, instead, we need to fix something on top, it is not doing anything worse, of course we could revert the |
|
I will try to add it while keeping both changes... |
Value-initialize `ret_value` in `dragonbox::compute_nearest` to zero the 4 bytes of tail padding in `fp_t<double,false,false>`. Without this, the uninitialized padding shadow propagates through stack slot reuse on fiber stacks and can contaminate unrelated values — causing MSan to report false "use-of-uninitialized- value" errors (e.g. in `shared_ptr` refcount decrements). This was the root cause of STID 4148-3044, which triggered the revert of PR #101621. The test verifies both the fix (padding is clean after `to_decimal`) and the underlying mechanism (default-init leaves padding uninitialized at offset 12). Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Add MSan support for fibers
I've looked at github, and there are 0 usage of
__msan_start_switch_fiber/__msan_finish_switch_fiberoutside of LLVM - https://github.com/search?q=%22__msan_start_switch_fiber%22++-path%3A%22compiler-rt%22+-path%3A%22msan_interface.h%22+-path%3A%22msan%2Fmsan.cpp%22+-path%3A%22msan_interface_internal.h%22+-path%3A%22swapcontext_annotation.cpp%22+&type=code&ref=advsearchSo either it is a problem in other places, or it is not mandatory
Also I've tried to reproduce the issue with simple fibers, w/o any luck, but probably this is what we are hitting here.
Refs: ClickHouse/boost#45
Reverts: #100138
Closes: #101566
Fixes: #101649
Version info
26.4.1.599