Skip to content

ICE and memory leak with recursive impls across libraries #2258

Closed
@erickt

Description

@erickt

Here's an example of the reduced bug: https://gist.github.com/2426493. When a.rs is compiled as a library then linked into b.rs, I get the following error:

./run-rustc a.rs
warning: no debug symbols in executable (-arch x86_64)
./run-rustc b.rs
rust: upcall fail 'Assertion start <= end failed', ../src/rustc/rustc.rc:1
error: internal compiler error unexpected failure
note: The compiler hit an unexpected failure path. This is a bug. Try running with RUST_LOG=rustc=0,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: upcall fail 'explicit failure', ../src/rustc/driver/rustc.rs:190
rust: domain main @0x102829810 root task failed
leaked memory in rust main loop (1 objects)
Assertion failed: (false), function ~memory_region, file ../src/rt/memory_region.cpp, line 172.
make: *** [all] Abort trap

I don't get this error if both of these files are merged, so I'm guessing it has something to do with the crate metadata.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-frontendArea: Compiler frontend (errors, parsing and HIR)A-linkageArea: linking into static, shared libraries and binariesI-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions