Skip to content

Commit 60a3a3f

Browse files
committed
Update bindings (introduces new UB warnings)
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]>
1 parent 173943b commit 60a3a3f

5 files changed

+1116
-1116
lines changed

0 commit comments

Comments
 (0)