Skip to content

SIGSEGV when compiling regex_automata wasm32-unknown-emscripten #69364

Closed
@lopopolo

Description

@lopopolo

Code

$ rustc --crate-name regex_automata /Users/lopopolo/.cargo/registry/src/github.com-1ecc6299db9ec823/regex-automata-0.1.8/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 -C metadata=53e0301393a8dd99 -C extra-filename=-53e0301393a8dd99 --out-dir /Users/lopopolo/dev/artichoke/playground/target/wasm32-unknown-emscripten/debug/deps --target wasm32-unknown-emscripten -L dependency=/Users/lopopolo/dev/artichoke/playground/target/wasm32-unknown-emscripten/debug/deps -L dependency=/Users/lopopolo/dev/artichoke/playground/target/debug/deps --extern byteorder=/Users/lopopolo/dev/artichoke/playground/target/wasm32-unknown-emscripten/debug/deps/libbyteorder-72d386ad6d326ca8.rmeta --cap-lints allow
{"artifact":"/Users/lopopolo/dev/artichoke/playground/target/wasm32-unknown-emscripten/debug/deps/regex_automata-53e0301393a8dd99.d","emit":"dep-info"}
{"artifact":"/Users/lopopolo/dev/artichoke/playground/target/wasm32-unknown-emscripten/debug/deps/libregex_automata-53e0301393a8dd99.rmeta","emit":"metadata"}
Called function must be a pointer!
  call addrspace(16046453) void <badref>(i8* %20), !dbg !53
in function _ZN4core6option15Option$LT$T$GT$5ok_or17h536d2927739d3b4fE
LLVM ERROR: Broken function found, compilation aborted!

Meta

rustc --version --verbose:

rustc 1.41.0 (5e1a79984 2020-01-27)
binary: rustc
commit-hash: 5e1a799842ba6ed4a57e91f7ab9435947482f7d8
commit-date: 2020-01-27
host: x86_64-apple-darwin
release: 1.41.0
LLVM version: 9.0

emcc --version:

emcc --version
emcc (Emscripten gcc/clang-like replacement) 1.39.8 (commit 1458145cf4f3db0fb548343e6acab267eef8e4ef)
Copyright (C) 2014 the Emscripten authors (see AUTHORS.txt)
This is free and open source software under the MIT license.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Release builds complete successfully.

Error output

Called function must be a pointer!
  call addrspace(16046453) void <badref>(i8* %20), !dbg !53
in function _ZN4core6option15Option$LT$T$GT$5ok_or17h536d2927739d3b4fE
LLVM ERROR: Broken function found, compilation aborted!
Backtrace

{"artifact":"/Users/lopopolo/dev/artichoke/playground/target/wasm32-unknown-emscripten/debug/deps/regex_automata-53e0301393a8dd99.d","emit":"dep-info"}
{"artifact":"/Users/lopopolo/dev/artichoke/playground/target/wasm32-unknown-emscripten/debug/deps/libregex_automata-53e0301393a8dd99.rmeta","emit":"metadata"}
Called function must be a pointer!
  call addrspace(6475917) void Segmentation fault: 11

Metadata

Metadata

Assignees

Labels

A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-codegenArea: Code generationC-bugCategory: This is a bug.E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustcE-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleI-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.O-wasmTarget: WASM (WebAssembly), http://webassembly.org/P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions