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
I am working on a compiler patch that automatically inserts checks for null pointers and null-backed references in debug mode (rust-lang/rust#134424). As part of my change I noticed that it breaks your crates' test-suite.
As part of the hdf5_types::imple_tuple! macro you create a reference backed by a null pointer, which is UB. The related code snippet is this one: https://github.com/aldanor/hdf5-rust/blob/master/hdf5-types/src/h5type.rs#L287-L332 and the line containing the problem is let &$($s)*(.., ref f, $(impl_tuple!(@second $tt _),)*) = unsafe { &*$origin };.
For more on why this is instant UB, please see the discussion here.
Please note that the tests will start failing as soon as this is enabled in the compiler. This is just a heads-up!
The text was updated successfully, but these errors were encountered:
Hello hdf5-rust maintainers,
I am working on a compiler patch that automatically inserts checks for null pointers and null-backed references in debug mode (rust-lang/rust#134424). As part of my change I noticed that it breaks your crates' test-suite.
As part of the
hdf5_types::imple_tuple!
macro you create a reference backed by a null pointer, which is UB. The related code snippet is this one: https://github.com/aldanor/hdf5-rust/blob/master/hdf5-types/src/h5type.rs#L287-L332 and the line containing the problem islet &$($s)*(.., ref f, $(impl_tuple!(@second $tt _),)*) = unsafe { &*$origin };
.For more on why this is instant UB, please see the discussion here.
Please note that the tests will start failing as soon as this is enabled in the compiler. This is just a heads-up!
The text was updated successfully, but these errors were encountered: