Skip to content

Logging some of the pseudo-crates causes even trivial programs to crash. #6888

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mstewartgallus opened this issue Jun 1, 2013 · 2 comments
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

Comments

@mstewartgallus
Copy link
Contributor

Logging some pseudo-crates (::rt:::mem, rt::upcall) causes even (as well as more complicated programs) the trivial hello world program to crash.

Hello world:

fn main () {
    println ("Hello World!")
}

Invocation on sh:

RUST_LOG="::rt::mem" ./hello

Result on ::rt::mem:

rust: new dom 0x4b2460
rust: new dom 0x4b31d0
rust: new task 0x4b4080
rust: creating new stack for task 4b4080
rust: calculating new stack size for 0x4b4080
rust: min: 768 current: 0 requested: 768
rust: next stack size: 1152
rust: new stk 0x4b43b0
rust: stk end 0x4b5060
hello: /home/steven/others/sources/rust/src/rt/rust_log.cpp:137: void rust_log::trace_ln(rust_task*, uint32_t, char*): Assertion `!task->on_rust_stack() && "logging on rust stack"' failed.

aborted (core dumped)

Result for ::rt::upcall

hello: /home/steven/others/sources/rust/src/rt/rust_log.cpp:137: void rust_log::trace_ln(rust_task*, uint32_t, char*): Assertion `!task->on_rust_stack() && "logging on rust stack"' failed.

aborted (core dumped)

@catamorphism
Copy link
Contributor

Reproduced with 330378d . I agree this is a bug; if logging certain crates isn't supported, the program should print out a nice error message.

@emberian
Copy link
Member

Pseudo-crates are gone.

flip1995 pushed a commit to flip1995/rust that referenced this issue Mar 25, 2021
docs: update RA setup documentation

Add documentation how to get rust-analyzer to like clippys `extern crate` rustc deps.

Fixes rust-lang#6883

This initially removed `cargo-dev ra_setup` but it is still needed by folks who use intellij rust, so keeping that.

changelog: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
Projects
None yet
Development

No branches or pull requests

3 participants