Repository navigation
Conversation
Prevent SharedDict lock inversion and cross-interpreter object access by storing serialized values in native memory. Guard partial resource construction, allocation failures and size arithmetic so cleanup and oversized inputs cannot corrupt or stall the VM.
Keep the timed operation well beyond its deadline so sanitizer scheduling overhead cannot let it complete before Erlang processes the timeout. The following call continues to verify that the reimport session recovers.
Use a one-second timed operation so sanitizer overhead cannot beat the deadline while Python versions that finish the sleep before recovery still keep the soak suite within its timetrap.
Queue Python namespace cleanup behind in-flight work instead of waiting during stop, so a timed-out call cannot make close kill the linked session owner. Gate timeout tests on an explicit release signal so scheduler delays cannot invert their result.
This file contains hidden or 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
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.
Shared dictionaries could deadlock the Erlang node when Python pickling re-entered the same dictionary or when Erlang and Python acquired the dictionary lock and GIL in opposite orders. Their interpreter-owned storage was also unsafe to access from owngil contexts. Several partially constructed NIF resources could clean up uninitialized state or release the same state twice, and some native size calculations could wrap.
Shared dictionaries now store serialized bytes in a mutex-protected native table, with Python serialization performed outside the table lock. Resource constructors track initialized fields so their destructors safely handle every failure point. Native allocation, frame-length and growth calculations now reject values that cannot be represented safely. Regression coverage exercises reentrant pickling and cross-interpreter SharedDict access.
There are no public API changes.