gh-127146: Emscripten: Fix test_open_undecodable_uri by setting -sTEXTDECODER=2 (#136624)

Removes the JS text decoder fallback and gets rid of the bugs due to the differences 
in behavior on invalid utf8 strings. See https://github.com/emscripten-core/emscripten/issues/24690.
This commit is contained in:
Hood Chatham
2025-07-13 20:30:38 +02:00
committed by GitHub
parent da699ed7e5
commit 283b050523
2 changed files with 3 additions and 0 deletions

View File

@@ -2338,6 +2338,8 @@ AS_CASE([$ac_sys_system],
AS_VAR_APPEND([LINKFORSHARED], [" -sEXPORTED_RUNTIME_METHODS=FS,callMain,ENV"])
AS_VAR_APPEND([LINKFORSHARED], [" -sEXPORTED_FUNCTIONS=_main,_Py_Version,__PyRuntime,__PyEM_EMSCRIPTEN_COUNT_ARGS_OFFSET,_PyGILState_GetThisThreadState,__Py_DumpTraceback"])
AS_VAR_APPEND([LINKFORSHARED], [" -sSTACK_SIZE=5MB"])
dnl Avoid bugs in JS fallback string decoding path
AS_VAR_APPEND([LINKFORSHARED], [" -sTEXTDECODER=2"])
AS_VAR_IF([enable_wasm_dynamic_linking], [yes], [
AS_VAR_APPEND([LINKFORSHARED], [" -sMAIN_MODULE"])