The combination of alloc_error_handler and target_features_11 is unsound #134234
Open
Description
opened on Dec 12, 2024
The following code compiles:
#![feature(target_feature_11, alloc_error_handler)]
#[target_feature(enable = "avx")]
#[alloc_error_handler]
fn f(_: std::alloc::Layout) -> ! {
panic!()
}
However, this is unsound if the allocation error handler is invoked on a machine that does not support avx
.
The alloc_error_handler feature is still unstable, tracking issue: #51540
This issue emerged during the stabilization PR for target_features_11: #134090
Activity