Repository navigation
Fix data race when tracing profile events - #113553
Conversation
|
Workflow [PR], commit [49bcc3d] Summary: ❌
AI ReviewSummaryThis PR hardens PR Metadata
Final Verdict✅ No blocking code findings. Update the LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 29/29 (100.00%) · Uncovered code |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
Only the stripped binary is compared: the official master build keeps debug symbols while PR builds strip them, so the other binaries differ by construction. Compile time of recompiled translation units8 translation units recompiled, 12 s compile time in total, 7 of them have a recent master baseline. |
…ld-trace-array-acquire
|
Same as in #112466, the bugfix validation check only builds the before build with UB + Address sanitizers - and to catch this bug we need TSan. I've verified 50/50 red before, 50/50 green after with TSan manually. |
…ld-trace-array-acquire # Conflicts: # src/Common/ProfileEvents.cpp # src/Common/tests/gtest_profile_events.cpp
| if (current->should_trace_array.load(std::memory_order_relaxed)) | ||
| { | ||
| if (auto * trace_arr = current->should_trace_array.load(std::memory_order_acquire)) | ||
| send_to_trace_log |= trace_arr[event].load(std::memory_order_relaxed); |
There was a problem hiding this comment.
datarace on trace_arr deref
just for other readers
Backport #113553 to 26.7: Fix data race when tracing profile events
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix a theoretical data race in profile events when using the
trace_profile_events_listsetting to write stack traces of certain profile events tosystem.trace_log.Version info
26.8.1.1710(included in26.8and later)26.7.5.4