diff options
author | Alex Richardson <Alexander.Richardson@cl.cam.ac.uk> | 2020-09-17 18:14:58 +0100 |
---|---|---|
committer | Alex Richardson <Alexander.Richardson@cl.cam.ac.uk> | 2020-09-17 18:14:58 +0100 |
commit | 0d8b61ea93fb1cd54d30d21823b0bc4d15347f2a (patch) | |
tree | 093a9c097060e9960e683dfdf0ddb2cde3ed08bc /build/cmake | |
parent | a38e62314a1fc0583788b42a05c4154491ca0bdf (diff) | |
download | libarchive-0d8b61ea93fb1cd54d30d21823b0bc4d15347f2a.tar.gz |
Avoid mismatch between library and test crypto configuration
I was investigating libarchive test failures on FreeBSD and it turns out
we get a reproducible SIGBUS for test_archive_m5, etc. Debugging this shows
that libarchive and the tests disagree when it comes to the definition of
archive_md5_ctx: libarchive assumes it's the OpenSSL type whereas the test
use the libmd type. The latter is not necessarily aligned enough to store
a pointer (16 bytes for CHERI RISC-V), so we were crashing when storing
EVP_MD_CTX* to an 8-byte-aligned archive_md5_ctx.
To avoid problems like this in the future, add a new macro to the config
header and use that to ensure that all configuration check macros have
been defined in archive_digest_private.h.
Diffstat (limited to 'build/cmake')
-rw-r--r-- | build/cmake/config.h.in | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/build/cmake/config.h.in b/build/cmake/config.h.in index fcbd80c5..6d2fa746 100644 --- a/build/cmake/config.h.in +++ b/build/cmake/config.h.in @@ -1,4 +1,5 @@ /* config.h. Generated from build/cmake/config.h.in by cmake configure */ +#define __LIBARCHIVE_CONFIG_H_INCLUDED 1 /* * Ensure we have C99-style int64_t, etc, all defined. |