You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
We shouldn't be able to tail-call #[track_caller] functions #145321
Instead, LLVM's opt --passes=verify fails b/c we're performing a tail call with an incompatible signature.
Meta
rustc --version --verbose:
whatever is nightly on august 12, 2025
Not really an ICE per se, but a llvm bug. It doesn't show up on nightly b/c llvm is not built with debug assertions, I think, but it does show up when you pass the generated llvm to opt. I did this in alive2.
I think we need to rework how tail calls handle both pre-mono and post-mono #[track_caller] :3
I think the problem with #[track_caller] is deeper than this -- specifically, I think we actually need to disallow calling #[track_caller] functions altogether (which I think we can only check for during monomorphization), or at least we need to be adjusting such calls to a "reify shim" when monomorphizing those tail calls, though I think that ends up leading to us pushing a stack frame which seems not good.
Activity
compiler-errors commentedon Aug 12, 2025
cc #145270 (comment)
lqd commentedon Aug 12, 2025
waffle has #144865 where these are linted as not doing anything until we can check for them post/during mono.
compiler-errors commentedon Aug 12, 2025
gamer
compiler-errors commentedon Aug 12, 2025
Duplicate of #144755 then
cannot guarantee tail call due to mismatched parameter counts#144755