Skip to content

RUST_BACKTRACE does not work anymore? #50138

Closed
@pravic

Description

@pravic

I have noticed a backtrace absence on Windows for a while. Stable/Nightly - all the same.

Checked on:

stable-i686-pc-windows-msvc
stable-x86_64-pc-windows-msvc
nightly-x86_64-pc-windows-msvc

update 1: 1.24.1 works fine. How come?
update 2: CARGO_INCREMENTAL=0 has no effect on it.

Linux binaries work as expected, with respect of 0, 1, full values of the RUST_BACKTRACE.

Windows binaries print exactly the same output regardless of environment variable (excluding note):

RUST_BACKTRACE=0:

Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Running target\debug\stacktrace.exe
thread 'main' panicked at 'called Option::unwrap() on a None value', libcore\option.rs:335:21
note: Run with RUST_BACKTRACE=1 for a backtrace.
error: process didn't exit successfully: target\debug\stacktrace.exe (exit code: 101)

RUST_BACKTRACE=1:

Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Running target\debug\stacktrace.exe
thread 'main' panicked at 'called Option::unwrap() on a None value', libcore\option.rs:335:21
error: process didn't exit successfully: target\debug\stacktrace.exe (exit code: 101)

Dummy code to reproduce
fn bar() {
  let some: Option<bool> = None;
  some.unwrap();
}

fn foo() {
  bar();
}

fn main() {
  foo(); foo();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    O-windowsOperating system: WindowsT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions