@WG-prioritization/alerts issue #80309 has been requested for prioritization.
I-nominated
?Is this unsound? I'm always confused
I wonder if this is a regression
No, this seems to happen since 1.16.0 when ptr_wrapping_offset
was stabilized
P-critical I guess? Illegal instruction using only safe code seems bad
Right, but I think it must be hard to hit in real code
Yea that’s true
I was wondering if I could try to look at the LLVM IR
Turns out this simple program generates 2182 lines (!) of LLVM IR with --emit=llvm-ir
:eyes:
I wasn't prepared :D
@Léo Lanteri Thauvin it should be a lot smaller if you remove the println
and compile with panic=abort
Ah, yes, that explains things :)
Also I need to use -O
:face_palm:
well if you use -O then you see it after the miscompilation
which may or may not be what you want
The miscompilation probably happens in LLVM, right?
I would be shocked if it happened in mir-opts
I know pretty much nothing about codegen :tired:
especially since it's release-only
Does --emit=llvm-ir
emit the IR before or after the LLVM passes?
after; you can disable LLVM passes with -Cno-prepopulate-passes
Ah, alright thanks :)
-Copt-level=1
still works (for me), so it might be better starting point for bisection
thinking about the priority, would it make sense a P-high
(although there is a repro also on safe code). I can't figure out the impact on real code (and if warrants a P-critical
)
I think starting with P-critical
makes the most sense
Yea I agree. Even if it’s super hard to hit it in real code it shouldn’t be possible
because of the safe code reproducible?
Yes