You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix interpreter heap corruption across Initialize/Shutdown cycles
Several caches and the sys run counter survived PythonEngine.Shutdown and
dangled into the next session, corrupting the interpreter heap on
re-initialization:
- Converter: add Reset() to dispose cached enum wrappers on shutdown.
- Runtime: only reuse the previous sys run counter when restoring stashed
AppDomain state (clr_data present); otherwise start a fresh run so leaked
objects from a dead session are skipped on finalization. Call
Converter.Reset() during shutdown.
- LookUpObject: use indexer assignment instead of Add so re-reflecting a
type in a later cycle does not throw a duplicate-key exception from the
native tp_getattro callback.
- TestPyObject: ignore the obsolete GetAttrDefault_IgnoresAttributeErrorOnly.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments