Skip to content

Dynamic linking suppresses stackeroverflow detection #110810

Open
@Eliah-Lakhin

Description

@Eliah-Lakhin

Code

The crate type is [lib] proc_macro = true. There are no explicit dependencies.

lib.rs code is:

use proc_macro::TokenStream;

#[proc_macro_attribute]
pub fn my_macro(_attr: TokenStream, _item: TokenStream) -> TokenStream {
    fn foo() {
        foo();
    }
    
    foo();

    todo!()
}

Invoking the macro in another crate leads to the following signal: 11, SIGSEGV: invalid memory reference error when compiling that other crate.

Meta

Reproduced on Stable:

rustc 1.69.0 (84c898d65 2023-04-16)
binary: rustc
commit-hash: 84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc
commit-date: 2023-04-16
host: x86_64-unknown-linux-gnu
release: 1.69.0
LLVM version: 15.0.7

And nightly:

rustc --version --verbose
rustc 1.71.0-nightly (f5559e338 2023-04-24)
binary: rustc
commit-hash: f5559e338256f17ada6d82b429acc2dbd8facc9c
commit-date: 2023-04-24
host: x86_64-unknown-linux-gnu
release: 1.71.0-nightly
LLVM version: 16.0.2

Error output

error: could not compile `crate_a` (lib)

Caused by:
  process didn't exit successfully: `rustc --crate-name crate_a --edition=2021 crates/crate_a/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=232 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C metadata=64fce3108dd917ff -C extra-filename=-64fce3108dd917ff --out-dir /home/eliah/Documents/projects/playground/rust/target/debug/deps -C incremental=/home/eliah/Documents/projects/playground/rust/target/debug/incremental -L dependency=/home/eliah/Documents/projects/playground/rust/target/debug/deps --extern crate_b=/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so` (signal: 11, SIGSEGV: invalid memory reference)
Backtrace

   Compiling crate_a v0.0.1 (/home/eliah/Documents/projects/playground/rust/crates/crate_a)
/home/eliah/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-8a3cc49b1def2c26.so(+0x31d6e63)[0x7f63769ede63]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x14420)[0x7f6373655420]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b1)[0x7f636900d1b1]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]
/home/eliah/Documents/projects/playground/rust/target/debug/deps/libcrate_b-5a8413c09751729e.so(+0xc1b6)[0x7f636900d1b6]

Activity

added
C-bugCategory: This is a bug.
I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
on Apr 25, 2023
Eliah-Lakhin

Eliah-Lakhin commented on Apr 25, 2023

@Eliah-Lakhin
Author

Possible duplicate of #77849 and #77869.

GoldsteinE

GoldsteinE commented on Apr 25, 2023

@GoldsteinE
Contributor

An easier way to reproduce: compile

#[allow(unconditional_recursion)]
fn bar() {
    bar()
}

#[no_mangle]
pub extern "C" fn foo() {
    bar()
}

with

crate-type = ["cdylib"]

and try to actually call this function:

void foo(void);

int main(void) {
	foo();
}

It seems like dynamic linking suppresses stack overflow detection. I’m not sure that’s a bug.

added
T-libsRelevant to the library team, which will review and decide on the PR/issue.
and removed
I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
on Apr 25, 2023
changed the title [-]"SIGSEGV Invalid memory reference" when applying a macro that overflows stack.[/-] [+]Dynamic linking suppresses stackeroverflow detection[/+] on Apr 25, 2023
Noratrieb

Noratrieb commented on Apr 25, 2023

@Noratrieb
Member

Changing the labels and title according to the investigation from @GoldsteinE

jyn514

jyn514 commented on Apr 26, 2023

@jyn514
Member

@Nilstrieb hmm, did you mean to label this as T-libs? Anything to do with guard pages seems like it should be T-compiler to me.

added
A-linkageArea: linking into static, shared libraries and binaries
A-securityArea: Security (example: address space layout randomization).
on Apr 26, 2023
Noratrieb

Noratrieb commented on Apr 26, 2023

@Noratrieb
Member

Ah, is this actually missing guard pages? Fair then, I though it was hitting them and just missing the stackerflow detection, which is implemented in the library.

jyn514

jyn514 commented on Apr 26, 2023

@jyn514
Member

I'll slap A-runtime on it to be safe 😄
@rustbot label A-runtime

2 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binariesA-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsA-securityArea: Security (example: address space layout randomization).C-bugCategory: This is a bug.T-libsRelevant to the library 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

        Participants

        @Eliah-Lakhin@GoldsteinE@bjorn3@jyn514@rustbot

        Issue actions

          Dynamic linking suppresses stackeroverflow detection · Issue #110810 · rust-lang/rust