-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
75099: tracing: fix corruption of structured recording buffer r=andreimatei a=andreimatei This patch fixes a bug leading to corruption of one of the Span's recording buffers. We had broken code like the following: ``` for _, e := range c.StructuredRecords { s.recordInternalLocked(&e, &s.mu.recording.structured) } ``` `recordInternalLocked(ptr)` takes ownership of ptr, so the `&e` is broken because `e` keep being reassigned. The bug was causing buffer elements to essentially be overwritten. In turn, this was leading to inconsistencies in the accounting of the size of the buffer's elements - we were maintaining a size sum that was diverging from the overwritten reality. Fixes #74994 Fixes #75045 Release note: None Co-authored-by: Andrei Matei <[email protected]>
- Loading branch information
Showing
2 changed files
with
29 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters