Skip to content

Update Emscripten libffi to 3.8.1 - #162188

Merged
freakboy3742 merged 1 commit into
python:mainfrom
agriyakhetarpal:emscripten-libffi-3.8.1
Nov 19, 2026
Merged

freakboy3742 merged 1 commit into
python:mainfrom
agriyakhetarpal:emscripten-libffi-3.8.1

Conversation

@agriyakhetarpal

Copy link
Copy Markdown
Contributor

Hi! This is a tiny PR that updates the libffi version used for the Emscripten build from 3.4.6 to 3.8.1. This is a companion PR to pyodide/pyodide#6560. @hoodmane suggested that it is alright for me to upstream this here.

libffi has removed support for -sWASM_BIGINT=0, so we can drop this flag. I did check if any tests can be updated, but it looks like we don't have any JSPI tests here, as we do in Pyodide.

In Pyodide, my reason for updating libffi was mostly to bring my change libffi/libffi#1062, but that more or less only matters for builds that set MAXIMUM_MEMORY. I only found out later that we don't do that here. So this PR is quite smaller than I expected. :)

Thank you!

@hoodmane

Copy link
Copy Markdown
Contributor

Thanks Agriya!

@agriyakhetarpal

Copy link
Copy Markdown
Contributor Author

Thanks for the review!

I am running tests locally on my macOS machine and I got it to crash with a RangeError: Maximum call stack size exceeded on test_code_module.test_compile_error. I don't think it's related to this change because ctypes shouldn't be imported in this test. However, I find that it reproduces on its own, in isolation. If I skip this test, I get the same stack overflow much later in the test suite, in test_pyrepl. Should I open an issue, or perhaps you have some hints about if this is just my environment?

@agriyakhetarpal

Copy link
Copy Markdown
Contributor Author

Looks like it's not related, indeed, because I just rebuilt with libffi 3.4.6 (on the current main), and both of these tests failed there, too. If they pass in CI here, it's probably just my machine :)

Would it make sense to have a CI job that runs Emscripten tests on macos-latest, too, besides Linux?

@freakboy3742 freakboy3742 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the PR!

Would it make sense to have a CI job that runs Emscripten tests on macos-latest, too, besides Linux?

I agree this would be nice to have; but macOS runners are both expensive and in comparatively short supply, so I'm hesitant to add a new macOS CI task.

@freakboy3742
freakboy3742 merged commit 391c7d7 into python:main Nov 19, 2026
38 checks passed
@agriyakhetarpal
agriyakhetarpal deleted the emscripten-libffi-3.8.1 branch November 19, 2026 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants