Landry,
I had issue with webcam in firefox (and chromium as well) in some google
meets meetings for a while.
Symptoms for firefox are:
1. webcam works well in preview before I click allow
2. when I click allow and enter the meeting, firefox crashed
3. if I use non loged in account (or different one? not sure) it actually
may work.
4. before crash I do have many lines like that in in output:
[firefox]76484/8133 sp=3f64ab5d8600 inside 79db877ff000-79db87bfbfff: not
MAP_STACK
after some investigation I had found a workaround:
javascript.options.wasm_js_promise_integration=false
which makes it work fine.
And here a normal patch for firefox. What shall I do with it? Probably it is
worth to be upstreamed but it is OpenBSD specific, I have no idea about
policy.
and if we decided to keep it in the tree, shall it be backported to all
firefox forks or just to some of them?
Here the diff:
Index: patches/patch-js_src_wasm_WasmStacks_cpp
===================================================================
RCS file: patches/patch-js_src_wasm_WasmStacks_cpp
diff -N patches/patch-js_src_wasm_WasmStacks_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-js_src_wasm_WasmStacks_cpp 20 Sep 2026 13:11:22 -0000
@@ -0,0 +1,59 @@
+Index: js/src/wasm/WasmStacks.cpp
+--- js/src/wasm/WasmStacks.cpp.orig
++++ js/src/wasm/WasmStacks.cpp
+@@ -42,6 +42,10 @@
+ #include "jit/MacroAssembler-inl.h"
+ #include "vm/JSObject-inl.h"
+
++#ifdef __OpenBSD__
++# include <sys/mman.h>
++#endif
++
+ #ifdef XP_WIN
+ // We only need the `windows.h` header, but this file can get unified built
+ // with WasmSignalHandlers.cpp, which requires `winternal.h` to be included
+@@ -494,7 +498,7 @@ void ContStackSize::compute() {
+ }
+
+ /* static */
+-void ContStack::init(ContStackArena* arena, uintptr_t allocationBase,
++bool ContStack::init(ContStackArena* arena, uintptr_t allocationBase,
+ const ContStackSize& size) {
+ // Derive region boundaries from the allocationBase.
+ //
+@@ -527,6 +531,15 @@ void ContStack::init(ContStackArena* arena, uintptr_t
+ gc::ProtectPages(reinterpret_cast<void*>(bottomGuardPagePhysicalStart),
+ bottomGuardPageSize);
+
++# ifdef __OpenBSD__
++ void* stackMemory = reinterpret_cast<void*>(redZonePhysicalStart);
++ size_t stackLength = jitStackPhysicalEnd - redZonePhysicalStart;
++ if (mmap(stackMemory, stackLength, PROT_READ | PROT_WRITE,
++ MAP_FIXED | MAP_STACK | MAP_ANON | MAP_PRIVATE, -1, 0) ==
MAP_FAILED) {
++ return false;
++ }
++# endif
++
+ ContStack* stack =
+ new (reinterpret_cast<void*>(headerPhysicalStart)) ContStack();
+
+@@ -554,6 +567,7 @@ void ContStack::init(ContStackArena* arena, uintptr_t
+
+ // We don't poison the stack here because the stack memory already is
+ // zero initialized and we don't want it all to get committed right away.
++ return true;
+ }
+
+ void ContStack::prepare(Handle<ContObject*> continuation,
+@@ -886,7 +900,10 @@ UniqueContStackArena ContStackArena::create(ContStackA
+ }
+
+ for (uint32_t i = 0; i < arena->capacity(); i++) {
+- ContStack::init(arena.get(), arena->stackAllocation(i),
owner->stackSize());
++ if (!ContStack::init(arena.get(), arena->stackAllocation(i),
++ owner->stackSize())) {
++ return nullptr;
++ }
+ }
+
+ return arena;
Index: patches/patch-js_src_wasm_WasmStacks_h
===================================================================
RCS file: patches/patch-js_src_wasm_WasmStacks_h
diff -N patches/patch-js_src_wasm_WasmStacks_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-js_src_wasm_WasmStacks_h 20 Sep 2026 13:11:22 -0000
@@ -0,0 +1,12 @@
+Index: js/src/wasm/WasmStacks.h
+--- js/src/wasm/WasmStacks.h.orig
++++ js/src/wasm/WasmStacks.h
+@@ -240,7 +240,7 @@ class ContStack {
+
+ // Initialize a ContStack in a ContStackArena. This will leave it in a
+ // poisoned state, ready to be prepared for use.
+- static void init(ContStackArena* arena, uintptr_t allocationBase,
++ static bool init(ContStackArena* arena, uintptr_t allocationBase,
+ const ContStackSize& size);
+ // Prepare a stack for execution. Must be called after init, poison, or
+ // decommit. Transitions pageState_ to Ready.
--
wbr, Kirill