Repository navigation
BUG: Remove shared separator state from field IO - #151
Merged
Merged
Conversation
Concurrent field reads and writes race on the shared separator, even when operating on separate streams. Keep the separator local to each call and pass it explicitly to the parsing helper.
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the separator-state change.
No open issues 🎉
What changed in this PR
Removes shared separator state from MetaIO field I/O to eliminate separator-related data races between calls using separate streams, while preserving the public API.
Changes:
- Uses each call’s separator argument directly in
MET_Read,MET_Write, and the internal parsing helper. - Adds integer round-trip checks for
=,:, and|, including exact serialized output checks.
| File | Description |
|---|---|
src/tests/testMeta1Utils.cxx |
Adds stream-based round-trip tests for three separators. |
src/metaUtils.cxx |
Removes the global separator and passes call-local values through parsing and writing. |
Review effort: Balanced
dzenanz
approved these changes
Nov 3, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove shared separator state from
MET_ReadandMET_Writeto eliminate a data race between calls using separate streams. Preserve the public API and add round-trip checks for default and custom separators.Root Cause
Both entry points assigned their separator argument to one global variable, also read by
MET_SkipToVal. Concurrent calls raced even with identical separators; different separators could corrupt parsing or output. Pass the separator directly to the helper instead.Validation
testMeta1Utilswith AppleClang in Debug mode.testMeta1Utilspassed, including round-trip checks for=,:, and|.git diff --checkpassed.AI Assistance
AI assistance was used to implement the change, add tests, and inspect repository history.