Open bill-torpey opened 3 years ago
On further testing, it is not ASAN per se that causes the ABORT, but the fact that the project was built for release. (For whatever reason, debug builds do not ABORT).
The global variable page_size
is never set -- the only place it is set is in _sodium_alloc_init
, which is never called. (It is called from sodium_init
in libsodium, but the sodium_init
in tweetnacl.c
hides the function in libsodium).
I'm not familiar with the security mechanism -- can someone please suggest the proper way to resolve this? Thanks!
AddressSanitizer doesn't play nice w/libsodium
When running unit tests under ASAN, I get the following:
Running under debugger (ASAN is not able to create core files), I get:
Presumably sodium_malloc is incompatible with ASAN. Because of this, we've started disabling libsodium (
WITH_LIBSODIUM=Off
) when building for ASAN.My question is whether this is a reasonable solution, in which case I'll submit a PR; or whether another approach would be better.
Environment