From c6c1999ea6fc1d99f47607d8ed90dab3230d013b Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Mon, 6 Jul 2026 13:33:29 -0700 Subject: [PATCH] Revert default for GROWABLE_ARRAYBUFFERS to 0 Split out from #27242. See: #27241 --- ChangeLog.md | 2 ++ site/source/docs/tools_reference/settings_reference.rst | 4 ++-- src/settings.js | 4 ++-- test/codesize/test_codesize_mem_O3_grow.json | 8 ++++---- test/codesize/test_codesize_mem_O3_grow_standalone.json | 8 ++++---- .../test_codesize_minimal_pthreads_memgrowth.json | 8 ++++---- 6 files changed, 18 insertions(+), 16 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index a05e236dc7247..99d84f7ffb075 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -38,6 +38,8 @@ See docs/process.md for more on how version tagging works. - `-fcoverage-mapping` is currently broken due to a mismatch between the version of LLVM used and the imported version of compiler-rt. We hope to fix this in the next release. (#27261) +- The default value for `GROWABLE_ARRAYBUFFERS` was reverted to `0` since we + found issues with Web API compatibility. (#27260) 6.0.2 - 07/01/26 ---------------- diff --git a/site/source/docs/tools_reference/settings_reference.rst b/site/source/docs/tools_reference/settings_reference.rst index ec12708d8ba48..cca2746b2f0ab 100644 --- a/site/source/docs/tools_reference/settings_reference.rst +++ b/site/source/docs/tools_reference/settings_reference.rst @@ -3435,13 +3435,13 @@ GROWABLE_ARRAYBUFFERS Enable support for growable views of Wasm memory. This is a recent Web platform feature that can make growing the Wasm memory more efficient, especially in multi-threaded builds. -The default setting of 1 will auto-detect the presence of this API and use +Setting this to 1 will auto-detect the presence of this API and use it when available. Setting this to 2 will unconditionally require it. This is the only way to completely remove the overhead of growable memory + pthreads. This settings does nothing unless ALLOW_MEMORY_GROWTH is set. -Default value: 1 +Default value: 0 .. _cross_origin: diff --git a/src/settings.js b/src/settings.js index eca9ba43602a7..24c88a7be4749 100644 --- a/src/settings.js +++ b/src/settings.js @@ -2276,13 +2276,13 @@ var JS_BASE64_API = false; // Enable support for growable views of Wasm memory. This is a recent Web // platform feature that can make growing the Wasm memory more efficient, // especially in multi-threaded builds. -// The default setting of 1 will auto-detect the presence of this API and use +// Setting this to 1 will auto-detect the presence of this API and use // it when available. // Setting this to 2 will unconditionally require it. This is the only way // to completely remove the overhead of growable memory + pthreads. // This settings does nothing unless ALLOW_MEMORY_GROWTH is set. // [link] -var GROWABLE_ARRAYBUFFERS = 1; +var GROWABLE_ARRAYBUFFERS = 0; // If the emscripten-generated program is hosted on separate origin then // starting new pthread worker can violate CSP rules. Enabling diff --git a/test/codesize/test_codesize_mem_O3_grow.json b/test/codesize/test_codesize_mem_O3_grow.json index f6607092d8ce1..f6bd386c93d8a 100644 --- a/test/codesize/test_codesize_mem_O3_grow.json +++ b/test/codesize/test_codesize_mem_O3_grow.json @@ -1,10 +1,10 @@ { - "a.out.js": 4394, - "a.out.js.gz": 2155, + "a.out.js": 4347, + "a.out.js.gz": 2138, "a.out.nodebug.wasm": 5261, "a.out.nodebug.wasm.gz": 2419, - "total": 9655, - "total_gz": 4574, + "total": 9608, + "total_gz": 4557, "sent": [ "a (emscripten_resize_heap)" ], diff --git a/test/codesize/test_codesize_mem_O3_grow_standalone.json b/test/codesize/test_codesize_mem_O3_grow_standalone.json index 3d8fe2492cb6f..3190458c7ceae 100644 --- a/test/codesize/test_codesize_mem_O3_grow_standalone.json +++ b/test/codesize/test_codesize_mem_O3_grow_standalone.json @@ -1,10 +1,10 @@ { - "a.out.js": 3860, - "a.out.js.gz": 1896, + "a.out.js": 3813, + "a.out.js.gz": 1874, "a.out.nodebug.wasm": 5641, "a.out.nodebug.wasm.gz": 2659, - "total": 9501, - "total_gz": 4555, + "total": 9454, + "total_gz": 4533, "sent": [ "args_get", "args_sizes_get", diff --git a/test/codesize/test_codesize_minimal_pthreads_memgrowth.json b/test/codesize/test_codesize_minimal_pthreads_memgrowth.json index ef610802c66d8..a8cdb839d7f6d 100644 --- a/test/codesize/test_codesize_minimal_pthreads_memgrowth.json +++ b/test/codesize/test_codesize_minimal_pthreads_memgrowth.json @@ -1,10 +1,10 @@ { - "a.out.js": 7550, - "a.out.js.gz": 3708, + "a.out.js": 7379, + "a.out.js.gz": 3639, "a.out.nodebug.wasm": 19064, "a.out.nodebug.wasm.gz": 8804, - "total": 26614, - "total_gz": 12512, + "total": 26443, + "total_gz": 12443, "sent": [ "a (memory)", "b (exit)",