[issue47162] Add call trampoline to work around bad fpcasts on Emscripten

Hood Chatham report at bugs.python.org
Fri Apr 1 19:48:49 EDT 2022


Hood Chatham <roberthoodchatham at gmail.com> added the comment:

As an update, building the chrome devtools with the wasm limit set to 12Mb following that guide worked fantastic. Highly recommend it. (Though there are a few paths that are out of date, I had to consult google's devtools docs.)

The problem is that `PyInit_imp_dummy` takes a spec argument which it ignores. Then the test calls it without a spec.
https://github.com/python/cpython/blob/082d3495d0c820972f09f6109a98ed7eb5a7b79f/Modules/_testmultiphase.c#L897

Minimized trigger:
```
import importlib
import imp
spec = importlib.util.find_spec('_testmultiphase')
imp.load_dynamic("test.imp_dummy", spec.origin)
```
Causes `RuntimeError: null function or function signature mismatch`

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue47162>
_______________________________________


More information about the Python-bugs-list mailing list