Skip to content
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

Raise Python exception on out-of-memory error condition #136

Merged
merged 9 commits into from
Jul 7, 2022
Merged

Conversation

jonmmease
Copy link
Collaborator

@jonmmease jonmmease commented Jul 7, 2022

This PR updates the vegafusion-python-embed library to raise an exception when memory allocation fails, rather than the prior behavior of segfaulting.

This is accomplished by enabling the nightly compiler flag -Z oom=panic added in rust-lang/rust#88098. PyO3 automatically catches panic conditions and converts them into PanicException exceptions.

This requires building the vegafusion-python-embed packages with the nightly toolchain.

This PR also bumps the version to 0.6.2

This way out of memory errors result in an exception rather than a hard crash
This has a smaller memory overhead
this is required for "-Z oom=panic" option

Use stable toolchain for other tasks (other than clippy, which is pinned)
This needs to be published locally
@jonmmease jonmmease merged commit d79eac4 into main Jul 7, 2022
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