New submission from Christian Heimes <li...@cheimes.de>:
The zoneinfo C extension has the "freefunc m_free" function with signature "static void module_free(void)". The signature of freefunc is "void (*freefunc)(void *)". It takes a void * argument, but module_free() does not. The signature mismatch is not a problem for most C compilers. But Web Assembly is more strict. wasm32-emscripten fails and aborts at runtime: worker.js onmessage() captured an uncaught exception: RuntimeError: function signature mismatch Pthread 0x8a1df0 sent an error! undefined:undefined: function signature mismatch /python-wasm/cpython/builddir/node/python.js:158 throw ex; ^ Error [RuntimeError]: function signature mismatch at module_dealloc (<anonymous>:wasm-function[1883]:0x9a15e) at _Py_Dealloc (<anonymous>:wasm-function[1959]:0x9eabe) at insertdict (<anonymous>:wasm-function[1624]:0x87ccb) at _PyDict_SetItem_Take2 (<anonymous>:wasm-function[1622]:0x8749c) at dict_ass_sub (<anonymous>:wasm-function[1708]:0x8e604) at PyObject_SetItem (<anonymous>:wasm-function[486]:0x34221) at finalize_modules (<anonymous>:wasm-function[3644]:0x1703d0) at Py_FinalizeEx (<anonymous>:wasm-function[3641]:0x16f986) at Py_RunMain (<anonymous>:wasm-function[4055]:0x191124) at pymain_main (<anonymous>:wasm-function[4058]:0x19174d) Emitted 'error' event on process instance at: at emitUnhandledRejectionOrErr (internal/event_target.js:579:11) at MessagePort.[nodejs.internal.kHybridDispatch] (internal/event_target.js:403:9) at MessagePort.exports.emitMessage (internal/per_context/messageport.js:18:26) ---------- assignee: christian.heimes components: Extension Modules messages: 410594 nosy: christian.heimes, p-ganssle priority: normal severity: normal status: open title: _zoneinfo module_free has invalid function signature type: crash versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue46383> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com