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

Python memory snapshot: add magic number and version #1894

Merged
merged 3 commits into from
Mar 27, 2024

Conversation

hoodmane
Copy link
Contributor

No description provided.

@hoodmane hoodmane requested a review from dom96 March 25, 2024 20:27
@hoodmane hoodmane force-pushed the hoodmane/snapshot-magic-version branch from da5b4ce to 05181c5 Compare March 25, 2024 20:43
@hoodmane hoodmane marked this pull request as ready for review March 25, 2024 20:44
@hoodmane hoodmane requested review from a team as code owners March 25, 2024 20:44
src/pyodide/internal/python.js Outdated Show resolved Hide resolved
src/pyodide/internal/python.js Outdated Show resolved Hide resolved
@hoodmane hoodmane force-pushed the hoodmane/snapshot-magic-version branch 8 times, most recently from dd18e00 to 5d47af1 Compare March 27, 2024 10:51
@@ -186,9 +186,13 @@ function loadDynlib(Module, path, wasmModuleData) {
* there.
*/
function preloadDynamicLibs(Module) {
let SO_FILES_TO_LOAD = SITE_PACKAGES_SO_FILES;
if (DSO_METADATA?.settings?.baselineSnapshot) {
SO_FILES_TO_LOAD = [[ '_lzma.so' ]];
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this definitely safe? Should we maybe not preload anything just to be extra cautious?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This gets imported by something in SNAPSHOT_IMPORTS I'm not really sure why. But because we use it in the snapshot, we'll crash without it.

@hoodmane hoodmane force-pushed the hoodmane/snapshot-magic-version branch 2 times, most recently from 0e7cb97 to bbde92e Compare March 27, 2024 11:34
@hoodmane hoodmane force-pushed the hoodmane/snapshot-magic-version branch from bbde92e to 81b39d2 Compare March 27, 2024 11:40
@hoodmane hoodmane merged commit a14b5b5 into main Mar 27, 2024
10 checks passed
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.

2 participants