botan: Segfault when running botan-test under Debian X32
My apologies if the Debian X32 platform is not supported. Its a chroot environment that provides an ILP32 data model.
./botan-test
...
ECGDSA secp256r1 keygen ran 18 tests all ok
ECGDSA secp384r1 keygen ran 18 tests all ok
ECGDSA secp521r1 keygen ran 18 tests all ok
ECIES ran 15 tests in 124.09 msec all ok
Segmentation fault
./configure.py --cc-abi-flags=-mx32
INFO: Platform: OS="Linux" machine="x86_64" proc=""
INFO: Guessing target OS is linux (use --os to set)
INFO: Guessing to use compiler gcc (use --cc to set)
INFO: Guessing target processor is a x86_64/x86_64 (use --cpu to set)
INFO: Target is gcc-linux-x86_64-x86_64
INFO: Skipping, dependency failure - sessions_sqlite3
INFO: Skipping, incompatible CPU - mp_x86_32 simd_altivec
INFO: Skipping, incompatible OS - beos_stats cryptoapi_rng darwin_secrandom win32_stats
INFO: Skipping, incompatible compiler - mp_x86_32_msvc
INFO: Skipping, only used if needed or requested - dyn_load mp_generic simd_scalar
INFO: Skipping, requires external dependency - boost bzip2 lzma openssl sqlite3 tpm zlib
INFO: Using MP module mp_x86_64
INFO: Using SIMD module simd_sse2
INFO: Loading modules adler32 aead aes aes_ni aes_ssse3 aont asn1 auto_rng base base64 bcrypt bigint blake2 block blowfish camellia cascade cast cbc cbc_mac ccm cfb chacha chacha20poly1305 clmul cmac codec_filt comb4p compression crc24 crc32 cryptobox ctr curve25519 datastor des dev_random dh dl_algo dl_group dlies dsa eax ec_gfp ec_group ecb ecc_key ecdh ecdsa ecgdsa ecies eckcdsa egd elgamal eme_oaep eme_pkcs1 eme_raw emsa1 emsa_pkcs1 emsa_pssr emsa_raw emsa_x931 entropy fd_unix ffi filters fpe_fe1 gcm gost_28147 gost_3410 gost_3411 has160 hash hash_id hex hkdf hmac hmac_drbg hmac_rng hres_timer http_util idea idea_sse2 if_algo kasumi kdf kdf1 kdf1_iso18033 kdf2 keccak keypair lion locking_allocator mac mars mce mceies md2 md4 md5 mdx_hash mgf1 misty1 mode_pad modes mp mp_x86_64 noekeon noekeon_simd nr numbertheory ocb ofb oid_lookup openpgp par_hash passhash9 pbes2 pbkdf pbkdf1 pbkdf2 pem pk_pad poly1305 prf_tls prf_x942 proc_walk pubkey rc2 rc4 rc5 rc6 rdrand rdseed rfc3394 rfc6979 rmd128 rmd160 rng rsa rw safer salsa20 seed serpent serpent_simd sessions_sql sha1 sha1_sse2 sha2_32 sha2_64 simd simd_sse2 siphash siv skein sp800_108 sp800_56c srp6 stream system_rng tea threefish threefish_avx2 tiger tls tss twofish unix_procs utils whirlpool x509 x919_mac x931_rng xtea xtea_simd xts
INFO: Assuming CPU is little endian
INFO: Assuming unaligned memory access works
INFO: Using symlink to link files into build dir (use --link-method to change)
INFO: Botan 1.11.31 (unreleased undated) build setup is complete
And:
g++ -march=native -dM -E - </dev/null | egrep '(_64|amd|ILP)' | sort
#define __amd64 1
#define __amd64__ 1
#define __ILP32__ 1
#define _ILP32 1
#define __x86_64 1
#define __x86_64__ 1
And:
g++ -dumpmachine
x86_64-linux-gnux32
And:
uname -a
Linux debian-8-x32-vm 4.6.0-1-amd64 #1 SMP Debian 4.6.2-1 (2016-06-15) x86_64 GNU/Linux
git rev-parse HEAD
c5369fc6f43379e9cb2f32e3d5b9a5ccd8f7ca1c
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 15 (15 by maintainers)
@noloader please try to configure with
./configure --cc-abi-flags=-mx32and append-fno-inline-functionsto CXXFLAGS. For me this magically fixed the problem. This took way to much time to find, but maybe it is helpful for further investigation.