Closed
Description
https://users.rust-lang.org/t/help-to-find-root-cause-of-illegal-hardware-instruction/17600/7 gets right to the thick of things. Basically, this playground demonstrates the SIGILL due to compiler emitting a ud2
instruction as a result of the UB hit when trying to make a value for libc::timezone
(an empty enum). However, this only happens on nightly and release (optimized) mode.
My concern is this type of thing will likely bite users, who may have (unintentionally) done something silly like the example above (why does libc define timezone
as an empty enum? I'm not sure). But my questions are mostly:
- Is this an expected change in nightly?
- Is it expected that only optimized (release) builds hit this? Why isn't a debug building compiling to the same thing?
Metadata
Metadata
Assignees
Labels
No labels