Skip to content

fix: retire removed XML element handles before freeing nodes - #1042

Merged
andiwand merged 1 commit into
mainfrom
review/24-removed-elements
Oct 5, 2026
Merged

andiwand merged 1 commit into
mainfrom
review/24-removed-elements

Conversation

@andiwand

@andiwand andiwand commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

🤖 Generated with Claude Code

Retained handles could dereference freed XML nodes after explicit element removal or replacement of a cell's displayed text. Retire those IDs in the shared registry and validate payload access. Removing a document root now refuses before deleting its DOM nodes.

After the first retirement, lookups also check ancestors. This covers descendants and secondary element chains without adding a liveness field to every stored node; unedited documents keep the existing constant-time lookup path. Cell writers reuse the same invalidation helper.

Validation: 501 editing, ODF, OOXML, HTML, and recalculation tests pass. One cross-format regression checks retained descendant handles and refused root removal; existing cell-write tests now assert that replaced text handles are rejected.

Structural row/column deletion is being reviewed separately.

@andiwand
andiwand force-pushed the review/23-cfb-validation branch from f7ae468 to f5744fe Compare October 5, 2026 07:08
Base automatically changed from review/23-cfb-validation to main October 5, 2026 07:09
@andiwand
andiwand force-pushed the review/24-removed-elements branch from 900def1 to 14bb998 Compare October 5, 2026 07:13
@andiwand
andiwand merged commit 101ee56 into main Oct 5, 2026
23 checks passed
@andiwand
andiwand deleted the review/24-removed-elements branch October 5, 2026 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant