Re:Achievement unlocked: rustc segfault
by comex on Sunday April 10, 2022 @08:23PM
(#30983180)
It is.
[ Parent
| on HN ]
Re:Achievement unlocked: rustc segfault
by eyelidlessness on Sunday April 10, 2022 @08:48PM
(#30983328)
Terse affirmative is ambiguous.
If you feed LLVM bad IR, all bets are off. LLVM's assertions and IR verifier are impressively comprehensive, but not a guarantee.
For example, LLVM has a pointer type and a void type, but you may not make a pointer-to-void type, see https://llvm.org/docs/LangRef.html#pointer-type . If you do call `Type::getVoidTy(C)->getPointerTo()` then LLVM will hit an assertion only in a build with assertions enabled. Without assertions LLVM may silently execute UB.