-
-
Notifications
You must be signed in to change notification settings - Fork 904
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 compaction on nodes (backport to v1.13.x) #2588
Merged
flavorjones
merged 7 commits into
v1.13.x
from
fix-compaction-on-nodes_backport-to-v1.13.x
Jul 12, 2022
Merged
Fix compaction on nodes (backport to v1.13.x) #2588
flavorjones
merged 7 commits into
v1.13.x
from
fix-compaction-on-nodes_backport-to-v1.13.x
Jul 12, 2022
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
flavorjones
changed the title
bFix compaction on nodes (backport to v1.13.x)
Fix compaction on nodes (backport to v1.13.x)
Jul 10, 2022
flavorjones
added
the
topic/memory
Segfaults, memory leaks, valgrind testing, etc.
label
Jul 10, 2022
Will look at CI failures tomorrow. |
flavorjones
force-pushed
the
fix-compaction-on-nodes_backport-to-v1.13.x
branch
from
July 11, 2022 15:54
7cdd4ee
to
3993f1e
Compare
Unconditionally set a mark function on the node wrapper. We will later refactor this to use TypedData_Wrap_Struct and we don't want to conditionally set mark functions on that Co-Authored-By: Mike Dalessio <mike.dalessio@gmail.com>
This commit introduces a `Noko_Node_Get_Struct` macro for unwrapping the underlying data pointer from Nokogiri objects. Then we change all places that unwrap nodes to use the new macro. We also converted xmlNode to use `TypedData_Wrap_Struct` so we can provide a compaction function. Note that we use DATA_PTR instead of "typed" unwrappers everywhere because the large number of C structs that inherit from xmlNode would make the unwrapping code unwieldy and type-check-heavy. Co-Authored-By: Matt Valentine-House <matt@eightbitraptor.com> Co-Authored-By: Mike Dalessio <mike.dalessio@gmail.com>
This fixes the case where nodes moves and we need to update the private references. Co-Authored-By: Matt Valentine-House <matt@eightbitraptor.com> Co-Authored-By: Mike Dalessio <mike.dalessio@gmail.com>
Co-Authored-By: Mike Dalessio <mike.dalessio@gmail.com>
We don't have `rb_gc_location` everywhere, so check for it in the extconf and then conditionally set the compaction callback Co-Authored-By: Mike Dalessio <mike.dalessio@gmail.com>
for warnings triggered by the compaction test. - for memory allocated in ary_heap_realloc - for memory added to the mark stack in stack_chunk_alloc
flavorjones
force-pushed
the
fix-compaction-on-nodes_backport-to-v1.13.x
branch
from
July 11, 2022 17:00
3993f1e
to
5f63c8b
Compare
and make sure the OCI image used in CI matches
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport
Backport of a PR to the current release branch
topic/memory
Segfaults, memory leaks, valgrind testing, etc.
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?
Backport of #2579 to v1.13.x