matklad / once_cell

Rust library for single assignment cells and lazy statics without macros
Apache License 2.0
1.87k stars 109 forks source link

Segmentation fault using Lazy static with Pkcs11 #253

Closed kristian1108 closed 9 months ago

kristian1108 commented 9 months ago

Pkcs11 works perfectly fine when not used as a lazy static.

But when wrapped in a Lazy static, the program seg faults on exit.

Reproduction: https://github.com/kristian1108/boring-reproduce

Note this only appears to be an issue on OSX Sonoma

kristian1108 commented 9 months ago

Pkcs11 works perfectly fine when not used as a lazy static.

But when wrapped in a Lazy static, the program seg faults on exit.

Reproduction: https://github.com/kristian1108/boring-reproduce

Note this only appears to be an issue on OSX Sonoma

Build the SoftHSM tools from source and that appears to have solved the issue. Instructions here: https://github.com/opendnssec/SoftHSMv2/tree/develop