rust-num / num-integer

Integer trait and functions for Rust
Apache License 2.0
180 stars 48 forks source link

Target asmjs-unknown-emscripten fails to compile #28

Closed mashedcode closed 5 years ago

mashedcode commented 5 years ago
   Compiling num-integer v0.1.41 (num-integer)
warning: `#[inline]` is ignored on function prototypes
   --> src/lib.rs:260:5
    |
260 |     #[inline]
    |     ^^^^^^^^^
    |
    = note: `#[warn(unused_attributes)]` on by default

Referencing function in another module!
  call void <badref>(i8* %40), !dbg !51
; ModuleID = 'r5a5ydnla8md0lz'
void (i8*)* <badref>
; ModuleID = '
error: could not compile `num-integer`.

Caused by:
  process didn't exit successfully: `rustc --crate-name num_integer src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="std"' -C metadata=f504e2cc341ea776 -C extra-filename=-f504e2cc341ea776 --out-dir num-integer/target/asmjs-unknown-emscripten/debug/deps --target asmjs-unknown-emscripten -C incremental=num-integer/target/asmjs-unknown-emscripten/debug/incremental -L dependency=num-integer/target/asmjs-unknown-emscripten/debug/deps -L dependency=num-integer/target/debug/deps --extern num_traits=num-integer/target/asmjs-unknown-emscripten/debug/deps/libnum_traits-f59bfd1ff0bed9bd.rmeta --cfg has_i128` (signal: 11, SIGSEGV: invalid memory reference)

Poorly I don't know what causes this.

cuviper commented 5 years ago

There's nothing specific to asmjs-unknown-emscripten in this code base, and it shouldn't be possible for code to crash the compiler anyway. Plus, this works on stable Rust 1.39, so this appears to be a clear compiler regression. I filed rust-lang/rust#66308.