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
Previously it was possible to trigger UB from safe code using the
`container_of!` macro. For example:
```rust
struct Foo {
a: (),
}
fn main() {
container_of!(core::ptr::null(), Foo, a); // UB
}
```
Using `wrapping_offset` instead of `offset` makes the macro safe to call
for any input.
Signed-off-by: Léo Lanteri Thauvin <[email protected]>
0 commit comments