https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106568
--- Comment #10 from Jeffrey Walton <noloader at gmail dot com> --- I'm not sure if this is helpful, but Valgrind is showing invalid reads in the unwind gear: $ valgrind ./cryptest.exe vv 51 ==27339== Memcheck, a memory error detector ==27339== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al. ==27339== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info ==27339== Command: ./cryptest.exe vv 51 ==27339== Using seed: 1660000617 ECGDSA validation suite running... ==27339== Invalid read of size 8 ==27339== at 0x4B8D673: _Unwind_Resume (unwind.inc:241) ==27339== by 0x433E55: ~vector (stl_vector.h:733) ==27339== by 0x433E55: ~OID (asn.h:267) ==27339== by 0x433E55: CryptoPP::Test::ValidateECGDSAStandard() [clone .cold] (validat9.cpp:370) ==27339== by 0x5409C3: CryptoPP::Test::ValidateECGDSA(bool) (validat9.cpp:663) ==27339== by 0x452476: CryptoPP::Test::Validate(int, bool) (test.cpp:995) ==27339== by 0x45ACA2: CryptoPP::Test::scoped_main(int, char**) (test.cpp:401) ==27339== by 0x4BB954F: (below main) (libc_start_call_main.h:58) ==27339== Address 0x4db3c00 is 0 bytes after a block of size 16 alloc'd ==27339== at 0x4847A83: memalign (vg_replace_malloc.c:1517) ==27339== by 0x5E4630: CryptoPP::AlignedAllocate(unsigned long) (allocate.cpp:49) ==27339== by 0x5D723C: allocate (secblock.h:215) ==27339== by 0x5D723C: SecBlock (secblock.h:767) ==27339== by 0x5D723C: CryptoPP::Integer::Integer() (integer.cpp:2967) ==27339== by 0x49AB74: DL_FixedBasePrecomputationImpl (eprecomp.h:133) ==27339== by 0x49AB74: CryptoPP::DL_PublicKeyImpl<CryptoPP::DL_GroupParameters_EC<CryptoPP::ECP> >::DL_PublicKeyImpl() (pubkey.h:1335) ==27339== by 0x540971: DL_PublicKey_ECGDSA (eccrypto.h:500) ==27339== by 0x540971: DL_ObjectImplBase (pubkey.h:1956) ==27339== by 0x540971: DL_ObjectImpl (pubkey.h:1996) ==27339== by 0x540971: DL_VerifierImpl (pubkey.h:2035) ==27339== by 0x540971: PK_FinalTemplate (pubkey.h:2209) ==27339== by 0x540971: CryptoPP::Test::ValidateECGDSAStandard() (validat9.cpp:340) ==27339== by 0x5409C3: CryptoPP::Test::ValidateECGDSA(bool) (validat9.cpp:663) ==27339== by 0x452476: CryptoPP::Test::Validate(int, bool) (test.cpp:995) ==27339== by 0x45ACA2: CryptoPP::Test::scoped_main(int, char**) (test.cpp:401) ==27339== by 0x4BB954F: (below main) (libc_start_call_main.h:58) ==27339== ==27339== Invalid read of size 8 ==27339== at 0x4B8CD14: _Unwind_RaiseException_Phase2 (unwind.inc:54) ==27339== by 0x4B8D6CC: _Unwind_Resume (unwind.inc:242) ==27339== by 0x433E55: ~vector (stl_vector.h:733) ==27339== by 0x433E55: ~OID (asn.h:267) ==27339== by 0x433E55: CryptoPP::Test::ValidateECGDSAStandard() [clone .cold] (validat9.cpp:370) ==27339== by 0x5409C3: CryptoPP::Test::ValidateECGDSA(bool) (validat9.cpp:663) ==27339== by 0x452476: CryptoPP::Test::Validate(int, bool) (test.cpp:995) ==27339== by 0x45ACA2: CryptoPP::Test::scoped_main(int, char**) (test.cpp:401) ==27339== by 0x4BB954F: (below main) (libc_start_call_main.h:58) ==27339== Address 0x4db3c08 is 8 bytes after a block of size 16 alloc'd ==27339== at 0x4847A83: memalign (vg_replace_malloc.c:1517) ==27339== by 0x5E4630: CryptoPP::AlignedAllocate(unsigned long) (allocate.cpp:49) ==27339== by 0x5D723C: allocate (secblock.h:215) ==27339== by 0x5D723C: SecBlock (secblock.h:767) ==27339== by 0x5D723C: CryptoPP::Integer::Integer() (integer.cpp:2967) ==27339== by 0x49AB74: DL_FixedBasePrecomputationImpl (eprecomp.h:133) ==27339== by 0x49AB74: CryptoPP::DL_PublicKeyImpl<CryptoPP::DL_GroupParameters_EC<CryptoPP::ECP> >::DL_PublicKeyImpl() (pubkey.h:1335) ==27339== by 0x540971: DL_PublicKey_ECGDSA (eccrypto.h:500) ==27339== by 0x540971: DL_ObjectImplBase (pubkey.h:1956) ==27339== by 0x540971: DL_ObjectImpl (pubkey.h:1996) ==27339== by 0x540971: DL_VerifierImpl (pubkey.h:2035) ==27339== by 0x540971: PK_FinalTemplate (pubkey.h:2209) ==27339== by 0x540971: CryptoPP::Test::ValidateECGDSAStandard() (validat9.cpp:340) ==27339== by 0x5409C3: CryptoPP::Test::ValidateECGDSA(bool) (validat9.cpp:663) ==27339== by 0x452476: CryptoPP::Test::Validate(int, bool) (test.cpp:995) ==27339== by 0x45ACA2: CryptoPP::Test::scoped_main(int, char**) (test.cpp:401) ==27339== by 0x4BB954F: (below main) (libc_start_call_main.h:58) ==27339== ==27339== Invalid read of size 8 ==27339== at 0x4B8D673: _Unwind_Resume (unwind.inc:241) ==27339== by 0x425BAB: CryptoPP::Test::scoped_main(int, char**) [clone .cold] (test.cpp:442) ==27339== by 0x4BB954F: (below main) (libc_start_call_main.h:58) ==27339== Address 0x4db3c00 is 0 bytes after a block of size 16 alloc'd ==27339== at 0x4847A83: memalign (vg_replace_malloc.c:1517) ==27339== by 0x5E4630: CryptoPP::AlignedAllocate(unsigned long) (allocate.cpp:49) ==27339== by 0x5D723C: allocate (secblock.h:215) ==27339== by 0x5D723C: SecBlock (secblock.h:767) ==27339== by 0x5D723C: CryptoPP::Integer::Integer() (integer.cpp:2967) ==27339== by 0x49AB74: DL_FixedBasePrecomputationImpl (eprecomp.h:133) ==27339== by 0x49AB74: CryptoPP::DL_PublicKeyImpl<CryptoPP::DL_GroupParameters_EC<CryptoPP::ECP> >::DL_PublicKeyImpl() (pubkey.h:1335) ==27339== by 0x540971: DL_PublicKey_ECGDSA (eccrypto.h:500) ==27339== by 0x540971: DL_ObjectImplBase (pubkey.h:1956) ==27339== by 0x540971: DL_ObjectImpl (pubkey.h:1996) ==27339== by 0x540971: DL_VerifierImpl (pubkey.h:2035) ==27339== by 0x540971: PK_FinalTemplate (pubkey.h:2209) ==27339== by 0x540971: CryptoPP::Test::ValidateECGDSAStandard() (validat9.cpp:340) ==27339== by 0x5409C3: CryptoPP::Test::ValidateECGDSA(bool) (validat9.cpp:663) ==27339== by 0x452476: CryptoPP::Test::Validate(int, bool) (test.cpp:995) ==27339== by 0x45ACA2: CryptoPP::Test::scoped_main(int, char**) (test.cpp:401) ==27339== by 0x4BB954F: (below main) (libc_start_call_main.h:58) ==27339== ==27339== Invalid read of size 8 ==27339== at 0x4B8CD14: _Unwind_RaiseException_Phase2 (unwind.inc:54) ==27339== by 0x4B8D6CC: _Unwind_Resume (unwind.inc:242) ==27339== by 0x425BAB: CryptoPP::Test::scoped_main(int, char**) [clone .cold] (test.cpp:442) ==27339== by 0x4BB954F: (below main) (libc_start_call_main.h:58) ==27339== Address 0x4db3c08 is 8 bytes after a block of size 16 alloc'd ==27339== at 0x4847A83: memalign (vg_replace_malloc.c:1517) ==27339== by 0x5E4630: CryptoPP::AlignedAllocate(unsigned long) (allocate.cpp:49) ==27339== by 0x5D723C: allocate (secblock.h:215) ==27339== by 0x5D723C: SecBlock (secblock.h:767) ==27339== by 0x5D723C: CryptoPP::Integer::Integer() (integer.cpp:2967) ==27339== by 0x49AB74: DL_FixedBasePrecomputationImpl (eprecomp.h:133) ==27339== by 0x49AB74: CryptoPP::DL_PublicKeyImpl<CryptoPP::DL_GroupParameters_EC<CryptoPP::ECP> >::DL_PublicKeyImpl() (pubkey.h:1335) ==27339== by 0x540971: DL_PublicKey_ECGDSA (eccrypto.h:500) ==27339== by 0x540971: DL_ObjectImplBase (pubkey.h:1956) ==27339== by 0x540971: DL_ObjectImpl (pubkey.h:1996) ==27339== by 0x540971: DL_VerifierImpl (pubkey.h:2035) ==27339== by 0x540971: PK_FinalTemplate (pubkey.h:2209) ==27339== by 0x540971: CryptoPP::Test::ValidateECGDSAStandard() (validat9.cpp:340) ==27339== by 0x5409C3: CryptoPP::Test::ValidateECGDSA(bool) (validat9.cpp:663) ==27339== by 0x452476: CryptoPP::Test::Validate(int, bool) (test.cpp:995) ==27339== by 0x45ACA2: CryptoPP::Test::scoped_main(int, char**) (test.cpp:401) ==27339== by 0x4BB954F: (below main) (libc_start_call_main.h:58) ==27339== ==27339== ==27339== Process terminating with default action of signal 6 (SIGABRT): dumping core ==27339== at 0x4C1ED0C: __pthread_kill_implementation (pthread_kill.c:44) ==27339== by 0x4BCEAE5: raise (raise.c:26) ==27339== by 0x4BB87FB: abort (abort.c:79) ==27339== by 0x4B796D9: _Unwind_Resume.cold (unwind.inc:246) ==27339== by 0x425BAB: CryptoPP::Test::scoped_main(int, char**) [clone .cold] (test.cpp:442) ==27339== by 0x4BB954F: (below main) (libc_start_call_main.h:58) ==27339== ==27339== HEAP SUMMARY: ==27339== in use at exit: 113,286 bytes in 801 blocks ==27339== total heap usage: 1,723 allocs, 922 frees, 145,415 bytes allocated ==27339== ==27339== LEAK SUMMARY: ==27339== definitely lost: 1,720 bytes in 28 blocks ==27339== indirectly lost: 2,304 bytes in 41 blocks ==27339== possibly lost: 0 bytes in 0 blocks ==27339== still reachable: 109,262 bytes in 732 blocks ==27339== suppressed: 0 bytes in 0 blocks