Closed Bug 1462333 Opened 7 years ago Closed 7 years ago

Assertion failure: !rt->mainContextFromOwnThread()->suppressGC, at js/src/gc/GC.cpp:7228 with verifyprebarries

Categories

(Core :: JavaScript: GC, defect)

x86_64
Linux
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox-esr52 --- unaffected
firefox-esr60 --- unaffected
firefox60 --- unaffected
firefox61 --- disabled
firefox62 --- fixed

People

(Reporter: decoder, Assigned: bbouvier)

References

Details

(4 keywords, Whiteboard: [jsbugmon:])

Attachments

(2 files)

The following testcase crashes on mozilla-central revision 8fb36531f7d0 (build with --enable-posix-nspr-emulation --enable-valgrind --enable-gczeal --disable-tests --disable-profiling --enable-debug --enable-optimize, run with --fuzzing-safe --wasm-gc): var lfModule = new WebAssembly.Module(wasmTextToBinary(` (module (import "global" "func" (result i32)) (func (export "func_0") (result i32) call 0 ;; calls the import, which is func #0 ) ) `)); verifyprebarriers(); processModule(lfModule, ` verifyprebarriers(); `); function processModule(module, jscode) { imports = {} for (let descriptor of WebAssembly.Module.imports(module)) { imports[descriptor.module] = {} imports[descriptor.module][descriptor.name] = new Function("x", "y", "z", jscode); instance = new WebAssembly.Instance(module, imports); for (let descriptor of WebAssembly.Module.exports(module)) instance.exports[descriptor.name](); } } Backtrace: received signal SIGSEGV, Segmentation fault. 0x0000000000ee9730 in js::gc::IsIncrementalGCUnsafe (rt=0x7ffff5f19000) at js/src/gc/GC.cpp:7228 #0 0x0000000000ee9730 in js::gc::IsIncrementalGCUnsafe (rt=0x7ffff5f19000) at js/src/gc/GC.cpp:7228 #1 0x0000000000f85d27 in js::gc::GCRuntime::endVerifyPreBarriers (this=0x7ffff5f19700) at js/src/gc/Verifier.cpp:362 #2 0x0000000000f8912f in js::gc::GCRuntime::verifyPreBarriers (this=<optimized out>) at js/src/gc/Verifier.cpp:406 #3 js::gc::VerifyBarriers (rt=<optimized out>, type=type@entry=js::gc::PreBarrierVerifier) at js/src/gc/Verifier.cpp:415 #4 0x00000000008b319b in VerifyPreBarriers (cx=<optimized out>, argc=<optimized out>, vp=<optimized out>) at js/src/builtin/TestingFunctions.cpp:1026 #5 0x00000000005b4b1e in js::CallJSNative (cx=0x7ffff5f17000, native=0x8b3150 <VerifyPreBarriers(JSContext*, unsigned int, JS::Value*)>, args=...) at js/src/vm/JSContext-inl.h:280 #6 0x00000000005a9a3f in js::InternalCallOrConstruct (cx=<optimized out>, cx@entry=0x7ffff5f17000, args=..., construct=construct@entry=js::NO_CONSTRUCT) at js/src/vm/Interpreter.cpp:467 #7 0x00000000005a9e1d in InternalCall (cx=0x7ffff5f17000, args=...) at js/src/vm/Interpreter.cpp:516 #8 0x000000000059d517 in js::CallFromStack (args=..., cx=<optimized out>) at js/src/vm/Interpreter.cpp:522 #9 Interpret (cx=0x7ffff5f17000, state=...) at js/src/vm/Interpreter.cpp:3086 #10 0x00000000005a94fd in js::RunScript (cx=0x7ffff5f17000, state=...) at js/src/vm/Interpreter.cpp:417 #11 0x00000000005a9b07 in js::InternalCallOrConstruct (cx=<optimized out>, cx@entry=0x7ffff5f17000, args=..., construct=construct@entry=js::NO_CONSTRUCT) at js/src/vm/Interpreter.cpp:489 #12 0x00000000005a9e1d in InternalCall (cx=0x7ffff5f17000, args=...) at js/src/vm/Interpreter.cpp:516 #13 0x00000000005a9fa0 in js::Call (cx=<optimized out>, fval=..., fval@entry=..., thisv=..., thisv@entry=..., args=..., rval=...) at js/src/vm/Interpreter.cpp:535 #14 0x0000000000e1eb68 in js::wasm::Instance::callImport (this=this@entry=0x7ffff495c660, cx=<optimized out>, cx@entry=0x7ffff5f17000, funcImportIndex=funcImportIndex@entry=0, argc=argc@entry=0, argv=argv@entry=0x7fffffffc4f0, rval=..., rval@entry=...) at js/src/wasm/WasmInstance.cpp:156 #15 0x0000000000e1f664 in js::wasm::Instance::callImport_i32 (instance=0x7ffff495c660, funcImportIndex=0, argc=0, argv=0x7fffffffc4f0) at js/src/wasm/WasmInstance.cpp:252 #16 0x00000e0a5275d0fc in ?? () [...] #22 0x0000000000000000 in ?? () rax 0x0 0 rbx 0x7ffff5f19000 140737319636992 rcx 0x7ffff6c282ad 140737333330605 rdx 0x0 0 rsi 0x7ffff6ef7770 140737336276848 rdi 0x7ffff6ef6540 140737336272192 rbp 0x7fffffffb2d0 140737488335568 rsp 0x7fffffffb2c0 140737488335552 r8 0x7ffff6ef7770 140737336276848 r9 0x7ffff7fe4780 140737354024832 r10 0x58 88 r11 0x7ffff6b9e7a0 140737332766624 r12 0x7ffff5f17000 140737319628800 r13 0x7ffff5f1a9d8 140737319643608 r14 0x7ffff5f1a958 140737319643480 r15 0x3 3 rip 0xee9730 <js::gc::IsIncrementalGCUnsafe(JSRuntime*)+112> => 0xee9730 <js::gc::IsIncrementalGCUnsafe(JSRuntime*)+112>: movl $0x0,0x0 0xee973b <js::gc::IsIncrementalGCUnsafe(JSRuntime*)+123>: ud2
Whiteboard: [jsbugmon:update,bisect] → [jsbugmon:bisect]
JSBugMon: Cannot process bug: Unable to automatically reproduce, please track manually.
Whiteboard: [jsbugmon:bisect] → [jsbugmon:]
Benjamin, is this related to the suppressGC behaviour of Wasm, which I read about in another bug?
Component: JavaScript Engine → JavaScript: GC
Flags: needinfo?(bbouvier)
Attached patch fix.patchSplinter Review
Yup, another testing function to disable until wasm gc is implemented.
Assignee: nobody → bbouvier
Status: NEW → ASSIGNED
Flags: needinfo?(bbouvier)
Attachment #8979249 - Flags: review?(jcoppeard)
Depends on: 1456824
Attachment #8979249 - Flags: review?(jcoppeard) → review+
scheduleforgc probably needs the same fix.
Attachment #8979278 - Flags: review?(jcoppeard)
Attachment #8979278 - Flags: review?(jcoppeard) → review+
Pushed by bbouvier@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/32458516749f Disable VerifyPrebarriers when wasm gc is enabled; r=jonco https://hg.mozilla.org/integration/mozilla-inbound/rev/1ea8ffe16237 Block testing function selectforgc when wasm gc is enabled; r=jonco
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: