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

Remove lz4_c patch #851

Merged
merged 2 commits into from
Dec 13, 2020
Merged

Remove lz4_c patch #851

merged 2 commits into from
Dec 13, 2020

Conversation

dalcde
Copy link
Contributor

@dalcde dalcde commented Dec 12, 2020

We use lz4 to compress files in our virtual filesystem. The lz4_c patch
patches emscripten to use a wasm version of lz4 instead of the default
javascript version.

I don't think this was ever supposed to work, and it definitely does not
work with emscripten 1.38.35. The reason is that we use lz4 to manage
the filesystem, which is loaded before the emscripten runtime is
initialized, and we are not supposed to call wasm functions before the
runtime is initialized.

The patch was originally included for performance reasons, but it
appears that there is in fact not much measurable performance
difference - the decompression algorithm is fairly straightforward and
presumably not difficult to JIT well.

We use lz4 to compress files in our virtual filesystem. The lz4_c patch
patches emscripten to use a wasm version of lz4 instead of the default
javascript version.

I don't think this was ever supposed to work, and it definitely does not
work with emscripten 1.38.35. The reason is that we use lz4 to manage
the filesystem, which is loaded before the emscripten runtime is
initialized, and we are not supposed to call wasm functions before the
runtime is initialized.

The patch was originally included for performance reasons, but it
appears that there is in fact not much measurable performance
difference - the decompression algorithm is fairly straightforward and
presumably not difficult to JIT well.
@dalcde dalcde changed the title Removing lz4_c patch Remove lz4_c patch Dec 12, 2020
@dalcde
Copy link
Contributor Author

dalcde commented Dec 13, 2020

It appears that removing lz4_c.patch also fixes the chrome memory access out of bounds issue

@rth
Copy link
Member

rth commented Dec 13, 2020

Thanks, that a good argument to include it in the release.

@rth rth merged commit 3402626 into pyodide:master Dec 13, 2020
@dalcde dalcde deleted the lz branch December 18, 2020 01:00
joemarshall pushed a commit to joemarshall/pyodide that referenced this pull request Jan 3, 2021
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