Skip to content

[Python] Add regression test for the exit-time crash of issue #23728 - #23849

Merged
dpiparo merged 1 commit into
root-project:masterfrom
guitargeek:fix-23728
Oct 28, 2026
Merged

dpiparo merged 1 commit into
root-project:masterfrom
guitargeek:fix-23728

Conversation

@guitargeek

@guitargeek guitargeek commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Reads a tree with a branch of a dictionary-less collection in a fresh Python process, lets TROOT::EndOfProcessCleanups delete it at exit, and constructs another dictionary-less object before exiting. This crashed in the JIT-compiled destructor lookup before the CppInterOp upgrade.

The child process runs with MALLOC_PERTURB_ set, because a use of destroyed objects only crashes reliably when freed memory is poisoned, and with ROOT_OBJECT_AUTO_REGISTRATION=1 plus explicit checks that the file is registered with gROOT and owns the tree, so the test keeps exercising the scenario when object auto-registration is disabled.

Assisted-by: claude-code:claude-fable-5-1

Comment thread bindings/pyroot/pythonizations/test/regression_23728.py
@guitargeek guitargeek changed the title [pyroot] Add regression test for the exit-time crash of issue #23728 [Python] Add regression test for the exit-time crash of issue #23728 Oct 27, 2026
@guitargeek

Copy link
Copy Markdown
Contributor Author

Hi @vepadulano, can you re-review please? The test also does its job very well of catching the older ROOT branches:

Comment thread bindings/pyroot/pythonizations/test/regression_23728.py Outdated
…oject#23728

Reads a tree with a branch of a dictionary-less collection in a fresh Python
process, lets TROOT::EndOfProcessCleanups delete it at exit, and constructs
another dictionary-less object before exiting. This crashed in the
JIT-compiled destructor lookup before the CppInterOp upgrade.

The child process runs with MALLOC_PERTURB_ set, because a use of destroyed
objects only crashes reliably when freed memory is poisoned, and with
ROOT_OBJECT_AUTO_REGISTRATION=1 plus explicit checks that the file is
registered with gROOT and owns the tree, so the test keeps exercising the
scenario when object auto-registration is disabled.

Assisted-by: claude-code:claude-fable-5-1

@vepadulano vepadulano left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM!

@guitargeek guitargeek added this to the 6.42.00-rc1 milestone Oct 27, 2026
@github-actions

Copy link
Copy Markdown

Test Results

    24 files      24 suites   4d 3h 45m 36s ⏱️
 3 900 tests  3 900 ✅ 0 💤 0 ❌
83 503 runs  83 503 ✅ 0 💤 0 ❌

Results for commit 2a5c016.

@dpiparo
dpiparo merged commit a41307c into root-project:master Oct 28, 2026
36 checks passed
@guitargeek
guitargeek deleted the fix-23728 branch October 28, 2026 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants