-
-
Notifications
You must be signed in to change notification settings - Fork 902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: namespace nodes behave with compaction #2658
Merged
Merged
Conversation
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
peterzhu2118
reviewed
Oct 6, 2022
flavorjones
force-pushed
the
flavorjones-namespace-scopes-compaction
branch
from
October 15, 2022 16:45
6bea7e0
to
8dacf06
Compare
flavorjones
force-pushed
the
flavorjones-namespace-scopes-compaction
branch
from
October 15, 2022 18:45
8dacf06
to
e1dd979
Compare
Interesting! Valgrind caught a problem: https://github.com/sparklemotion/nokogiri/actions/runs/3256748720/jobs/5347591384#step:7:3223 |
I haven't used it in years, TBH, and what it does is completely insufficient to debug memory issues in modern Ruby anyway.
flavorjones
force-pushed
the
flavorjones-namespace-scopes-compaction
branch
from
October 16, 2022 14:09
e1dd979
to
d42abaa
Compare
🤯 So fixing compaction for namespaces has caught a long-standing use-after-free bug in in the |
Co-Authored-By: Matt Valentine-House <[email protected]> Co-Authored-By: Peter Zhu <[email protected]>
flavorjones
force-pushed
the
flavorjones-namespace-scopes-compaction
branch
from
October 16, 2022 14:12
d42abaa
to
13c8aaa
Compare
flavorjones
added
the
topic/memory
Segfaults, memory leaks, valgrind testing, etc.
label
Oct 16, 2022
This was referenced Oct 18, 2022
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.
What problem is this PR intended to solve?
Under certain circumstances, GC compaction will cause a segfault when accessing wrapped
XML::Namespace
objects.See previous similar work at #2579
This fix, if merged, should be backported to v1.13.x and released as a bugfix.
Have you included adequate test coverage?
Yes, repro test is included thanks to @eightbitraptor and @peterzhu2118
Does this change affect the behavior of either the C or the Java implementations?
No functional behavior changes.