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

2022-04-01 Thread Hood Chatham
Hood Chatham added the comment: Actually, I think the _PyImport_InitFunc trampoline call is only there as a work around for the problematic `test_imp` and `test_import` Python tests. I don't know of any third party code with a problem there. --

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

2022-04-01 Thread Hood Chatham
Hood Chatham 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

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

2022-04-01 Thread Hood Chatham
Hood Chatham added the comment: I'm having trouble pinpointing the bad function pointer because chrome cuts off the end of the wasm file with: ``` ;; text is truncated due to size ``` Maybe I should follow the directions here, since this is a consistent nuisance.

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

2022-04-01 Thread Christian Heimes
Christian Heimes added the comment: Interesting, can you pin point the buggy function pointer? If you link with -gsource-map and deploy the map file, your browser should give you a decent stack trace. -- ___ Python tracker

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

2022-04-01 Thread Hood Chatham
Hood Chatham added the comment: Note that there are still Python test suite failures in emscripten without these trampolines enabled, for instance test_imp fails. The only trampoline needed to pass the core test suite is _PyImport_InitFunc_TrampolineCall. -- nosy: +hoodchatham

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

2022-03-30 Thread miss-islington
miss-islington added the comment: New changeset 581c4434de62d9d36392f10e65866c081fb18d71 by Christian Heimes in branch 'main': bpo-47162: Add call trampoline to mitigate bad fpcasts on Emscripten (GH-32189) https://github.com/python/cpython/commit/581c4434de62d9d36392f10e65866c081fb18d71

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

2022-03-30 Thread Christian Heimes
Change by Christian Heimes : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

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

2022-03-30 Thread Christian Heimes
Change by Christian Heimes : -- keywords: +patch pull_requests: +30267 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32189 ___ Python tracker

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

2022-03-30 Thread Christian Heimes
New submission from Christian Heimes : WASM cannot handle function calls with bad function pointer casts yet. Hood Chatham explained the issue in Pyodide patch https://github.com/pyodide/pyodide/blob/0.19.1/cpython/patches/0001-call-trampolines-to-handle-fpcast-troubles.patch --- The wasm