Closed Bug 1295166 Opened 10 years ago Closed 10 years ago

[wasm] Assertion failure: dest != src, at js/src/jit/arm/MacroAssembler-arm-inl.h:426

Categories

(Core :: JavaScript Engine, defect)

ARM
Linux
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: decoder, Assigned: bbouvier)

Details

(Keywords: assertion, testcase)

Attachments

(2 files)

The attached binary WebAssembly testcase crashes on mozilla-inbound revision 7e0d9eb7eb05+ (build with --enable-posix-nspr-emulation --enable-valgrind --enable-gczeal --disable-tests --enable-address-sanitizer --disable-jemalloc --enable-optimize=-O2 --without-intl-api --enable-debug --target=i686-pc-linux-gnu --enable-simulator=arm). To reproduce, you can run the following code in the JS shell (running with --wasm-always-baseline might be necessary): var data = os.file.readFile(file, 'binary'); Wasm.instantiateModule(new Uint8Array(data.buffer)); Backtrace: ==13415==ERROR: AddressSanitizer: SEGV on unknown address 0x00000000 (pc 0x097c8b43 bp 0xff9db608 sp 0xff9db3e0 T0) #0 0x97c8b42 in js::jit::MacroAssembler::mul64(js::jit::Register64 const&, js::jit::Register64 const&, js::jit::Register) js/src/jit/arm/MacroAssembler-arm-inl.h:426:5 #1 0x9666dec in js::jit::CodeGeneratorARM::visitMulI64(js::jit::LMulI64*) js/src/jit/arm/CodeGenerator-arm.cpp:498:9 #2 0x9268258 in js::jit::LMulI64::accept(js::jit::LElementVisitor*) js/src/jit/shared/LIR-shared.h:3855:5 #3 0x8af2220 in js::jit::CodeGenerator::generateBody() js/src/jit/CodeGenerator.cpp:5148:13 #4 0x8b84d50 in js::jit::CodeGenerator::generateWasm(js::wasm::SigIdDesc, js::wasm::FuncOffsets*) js/src/jit/CodeGenerator.cpp:9007:10 #5 0xb6c57b1 in js::wasm::IonCompileFunction(js::wasm::IonCompileTask*) js/src/asmjs/WasmIonCompile.cpp:3602:14 #6 0xb6f2c18 in js::wasm::CompileFunction(js::wasm::IonCompileTask*) js/src/asmjs/WasmIonCompile.cpp:3617:16 #7 0xb664448 in js::wasm::ModuleGenerator::finishFuncDef(unsigned int, js::wasm::FunctionGenerator*) js/src/asmjs/WasmGenerator.cpp:866:14 #8 0xb5eaf07 in DecodeFunctionBody(js::wasm::Decoder&, js::wasm::ModuleGenerator&, unsigned int) js/src/asmjs/WasmCompile.cpp:1299:12 #9 0xb5eaf07 in DecodeCodeSection(js::wasm::Decoder&, js::wasm::ModuleGenerator&) js/src/asmjs/WasmCompile.cpp:1359 #10 0xb5eaf07 in js::wasm::Compile(js::wasm::ShareableBytes const&, js::wasm::CompileArgs&&, mozilla::UniquePtr<char [], JS::FreePolicy>*) js/src/asmjs/WasmCompile.cpp:1640 #11 0x83026a7 in js::wasm::Eval(JSContext*, JS::Handle<js::TypedArrayObject*>, JS::Handle<JSObject*>, JS::MutableHandle<js::WasmInstanceObject*>) js/src/asmjs/WasmJS.cpp:238:27 #12 0x822f65f in WasmLoop(JSContext*, unsigned int, JS::Value*) js/src/shell/js.cpp:5281:14 [...] I confirmed that this still reproduces on tip with all of the previous fixes landed.
Attached file Testcase —
Flags: needinfo?(hv1989)
Interestingly, the test case in bug 1298808 asserts here too. Taking.
Flags: needinfo?(hv1989)
Attached patch arm.patch — — Splinter Review
The imul64 codegen on ARM really doesn't want src == dest, so it's another simple regalloc tweak. Can you confirm, please?
Assignee: nobody → bbouvier
Status: NEW → ASSIGNED
Attachment #8785956 - Flags: review?(hv1989)
Comment on attachment 8785956 [details] [diff] [review] arm.patch Review of attachment 8785956 [details] [diff] [review]: ----------------------------------------------------------------- Can you try to add a testcase?
Attachment #8785956 - Flags: review?(hv1989) → review+
Pushed by bbouvier@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/09bb2600540a Don't useAtStart rhs in int64 mul on ARM; r=h4writer
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: