Port the without_debuginfo test from backtrace-rs to the testsuite#152860
Port the without_debuginfo test from backtrace-rs to the testsuite#152860JayanAXHF wants to merge 7 commits intorust-lang:mainfrom
without_debuginfo test from backtrace-rs to the testsuite#152860Conversation
|
|
This comment has been minimized.
This comment has been minimized.
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This comment has been minimized.
This comment has been minimized.
6f4d672 to
a7b8152
Compare
|
Some changes occurred in src/tools/cargo cc @ehuss |
This comment has been minimized.
This comment has been minimized.
2afe45b to
e93dd0f
Compare
e93dd0f to
2ee2332
Compare
This comment has been minimized.
This comment has been minimized.
|
@workingjubilee This CI failure seems unrelated to the test? Is this a known issue/regression? |
|
that's weird. |
| fn main() { | ||
| let mut missing_symbols = 0; | ||
| let mut has_symbols = 0; | ||
| let btrace = backtrace::Backtrace::force_capture(); | ||
| let frames = btrace.frames(); | ||
| for frame in frames { | ||
| let mut any = false; | ||
| for sym in frame.symbols() { | ||
| if sym.name().is_some() { | ||
| any = true; | ||
| break; | ||
| } | ||
| } | ||
| if any { | ||
| has_symbols += 1; | ||
| } else if !frame.ip().is_null() { | ||
| missing_symbols += 1; | ||
| } | ||
| } | ||
|
|
||
| // FIXME(#346) currently on MinGW we can't symbolize kernel32.dll and other | ||
| // system libraries, which means we miss the last few symbols. | ||
| if cfg!(windows) && cfg!(target_env = "gnu") { | ||
| assert!(missing_symbols < has_symbols && has_symbols > 4); | ||
| } else { | ||
| assert_eq!(missing_symbols, 0); | ||
| } |
There was a problem hiding this comment.
This isn't a known problem, so we may need to determine how many frames are missing symbols and it may be aarch64-unknown-linux-gnu specific.
There was a problem hiding this comment.
Well it doesn't occur on my arm m2 mac so maybe it's specific? Might wanna check windows too to determine if it's x86
There was a problem hiding this comment.
Oops I misread the target. Do you mind if I rerun the CI for x86 Linux to try to repro the problem?
There was a problem hiding this comment.
@workingjubilee I added some debug info to try to find the frame with the missing info. Also could #152870 be relevant to this?
This comment has been minimized.
This comment has been minimized.
2f11378 to
f245f10
Compare
This is the relevant debug log. Apparently the |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
60edd1c to
a54b642
Compare
|
@workingjubilee do you have any time to look at this soon? |
Part of #122899
Ports over the
without_debuginfofrom backtrace-rs to the testsuite.Caveat: I had to create a nightly feature
backtrace_internals_accessorsto access the internals ofstd::backtrace::Backtraceandstd::backtrace::BacktraceFrames. It is not on the stabilisation track, since it doesn't have an ACP.r? @workingjubilee