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
Bindgen uses several patterns that introduce undefined behavior
which rust identifies and warns about. Unlike the nullptr deref
warnings suppressed in a19577c, this set of warnings cannot be
suppressed and even includes a note that it will become a hard
error in some future rust version.
The UB is caused by referencing unaligned struct members, which
is caused by forcing tight packing of the C structures (see
prior commit) in the headers bindgen reads and translates into
`repr(C,packed)`.
This problem is being discussed/tracked under the same github
issue as nullptr deref (rust-lang/rust-bindgen#1651). C
structure packing is a requirement of PKCS#11, so the packing
can't simply be omitted. Because the current rust version only
produces warnings, they are (currently) only a nuisance. If they
become a real issue (e.g., are upgraded to a compile error)
disabling the generation of these tests remains an option.
Signed-off-by: Keith Koskie <[email protected]>
0 commit comments