Closed
Description
After reducing a repro of a potential track_caller bug from @yaahc, I get a segfault from this code:
trait Handler {
fn handle(&self);
}
impl<T> Handler for T {
#[track_caller]
fn handle(&self) {
assert_eq!(std::panic::Location::caller().file(), file!());
}
}
fn main() {
let handler: &(dyn Handler) = &5u8;
handler.handle();
}
This repros for me on my up-to-date checkout as well as for the current beta compiler. I'm not sure whether that makes this a regression from stable to beta, since it's an apparent bug in an API which is first stabilizing in this release.
cc @eddyb
Metadata
Metadata
Assignees
Labels
Category: This is a bug.`#![feature(track_caller)]`Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessCritical priorityRelevant to the compiler team, which will review and decide on the PR/issue.Performance or correctness regression from one stable version to another.