Win build#8
Closed
christianpaquin wants to merge 2 commits into
Closed
Conversation
Simewu
pushed a commit
to prchander/liboqs
that referenced
this pull request
Aug 19, 2022
Upgrade to master
mingtaoy
pushed a commit
to mingtaoy/liboqs
that referenced
this pull request
Sep 4, 2024
The FIPS202x2 implementation does not play well with ASAN. Specifically, when handling the trailing blocks that are not divisible by 8, the implementation uses an 8 byte load followed by a mask to process the trailing bytes of the input (https://github.com/open-quantum-safe/liboqs/blob/d93a431aaf9ac929f267901509e968a5727c053c/src/kem/kyber/oldpqclean_kyber512_aarch64/fips202x2.c#L475-L476) While this may work in practice, performing an 8 byte load on an input with fewer than 8 bytes remaining leads to UB (and an ASAN error) when the input size cannot accomodate such a load. A simple repro, built with `-fsanitize=address` shows this: ```c static void keypair(const char* alg) { OQS_KEM* kem = OQS_KEM_new(alg); unsigned char* public = malloc(kem->length_public_key); unsigned char* sec = malloc(kem->length_secret_key); kem->keypair(public, sec); free(sec); free(public); OQS_KEM_free(kem); } int main() { keypair(OQS_KEM_alg_kyber_512); keypair(OQS_KEM_alg_kyber_768); keypair(OQS_KEM_alg_kyber_1024); return 0; } ``` results in the following error: ``` ================================================================= ==613880==ERROR: AddressSanitizer: stack-buffer-overflow on address 0xfffff57a5160 at pc 0x0000004e9ef4 bp 0xfffff57a5030 sp 0xfffff57a5020 READ of size 8 at 0xfffff57a5160 thread T0 #0 0x4e9ef0 in keccakx2_absorb.constprop.1 (/data/users/mingtao/3/oqsrepro/buildopt/oqsrepro+0x4e9ef0) open-quantum-safe#1 0x4a608c in PQCLEAN_KYBER512_AARCH64_neon_kyber_shake128_absorb (/data/users/mingtao/3/oqsrepro/buildopt/oqsrepro+0x4a608c) open-quantum-safe#2 0x4a51a8 in PQCLEAN_KYBER512_AARCH64_gen_matrix (/data/users/mingtao/3/oqsrepro/buildopt/oqsrepro+0x4a51a8) open-quantum-safe#3 0x4a5360 in PQCLEAN_KYBER512_AARCH64_indcpa_keypair (/data/users/mingtao/3/oqsrepro/buildopt/oqsrepro+0x4a5360) open-quantum-safe#4 0x45e460 in PQCLEAN_KYBER512_AARCH64_crypto_kem_keypair (/data/users/mingtao/3/oqsrepro/buildopt/oqsrepro+0x45e460) open-quantum-safe#5 0x4075c0 in keypair (/data/users/mingtao/3/oqsrepro/buildopt/oqsrepro+0x4075c0) open-quantum-safe#6 0x405598 in main (/data/users/mingtao/3/oqsrepro/buildopt/oqsrepro+0x405598) open-quantum-safe#7 0xfffcbbd772fc in __libc_start_call_main (/lib64/libc.so.6+0x272fc) open-quantum-safe#8 0xfffcbbd773d4 in __libc_start_main_impl (/lib64/libc.so.6+0x273d4) open-quantum-safe#9 0x40746c in _start (/data/users/mingtao/3/oqsrepro/buildopt/oqsrepro+0x40746c) Address 0xfffff57a5160 is located in stack of thread T0 at offset 64 in frame #0 0x4a5efc in PQCLEAN_KYBER512_AARCH64_neon_kyber_shake128_absorb (/data/users/mingtao/3/oqsrepro/buildopt/oqsrepro+0x4a5efc) This frame has 2 object(s): [32, 66) 'extseed1' (line 59) <== Memory access at offset 64 partially overflows this variable [112, 146) 'extseed2' (line 60) HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork (longjmp and C++ exceptions *are* supported) SUMMARY: AddressSanitizer: stack-buffer-overflow (/data/users/mingtao/3/oqsrepro/buildopt/oqsrepro+0x4e9ef0) in keccakx2_absorb.constprop.1 Shadow bytes around the buggy address: 0x200ffeaf49d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x200ffeaf49e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x200ffeaf49f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x200ffeaf4a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x200ffeaf4a10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x200ffeaf4a20: 00 00 00 00 f1 f1 f1 f1 00 00 00 00[02]f2 f2 f2 0x200ffeaf4a30: f2 f2 00 00 00 00 02 f3 f3 f3 f3 f3 00 00 00 00 0x200ffeaf4a40: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 0x200ffeaf4a50: f1 f1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x200ffeaf4a60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x200ffeaf4a70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc ==613880==ABORTING ``` This PR sidesteps this issue by ensuring that `extseed1` and `extseed2` are sized to be divisible by 8, which avoids the problematic codepath. Other alternatives considered for this PR were to modify the `keccakx2_absorb` implementation (e.g. to memcpy the remaining data into a local 8 byte buffer first) -- however this approach inhibited inlining of the absorb implementation and resulted in a call to `memcpy` which could not be optimized out due to the variable-length `inlen`. Tested with `ninja run_tests` and ensured that ASAN repro no longer fires. Co-Authored-By: Kyle Nekritz <knekritz@meta.com>
mingtaoy
pushed a commit
to mingtaoy/liboqs
that referenced
this pull request
Sep 4, 2024
The FIPS202x2 implementation does not play well with ASAN. Specifically, when handling the trailing blocks that are not divisible by 8, the implementation uses an 8 byte load followed by a mask to process the trailing bytes of the input (https://github.com/open-quantum-safe/liboqs/blob/d93a431aaf9ac929f267901509e968a5727c053c/src/kem/kyber/oldpqclean_kyber512_aarch64/fips202x2.c#L475-L476) While this may work in practice, performing an 8 byte load on an input with fewer than 8 bytes remaining leads to UB (and an ASAN error) when the input size cannot accomodate such a load. A simple repro, built with `-fsanitize=address` shows this: ```c static void keypair(const char* alg) { OQS_KEM* kem = OQS_KEM_new(alg); unsigned char* public = malloc(kem->length_public_key); unsigned char* sec = malloc(kem->length_secret_key); kem->keypair(public, sec); free(sec); free(public); OQS_KEM_free(kem); } int main() { keypair(OQS_KEM_alg_kyber_512); keypair(OQS_KEM_alg_kyber_768); keypair(OQS_KEM_alg_kyber_1024); return 0; } ``` results in the following error: ``` ================================================================= ==613880==ERROR: AddressSanitizer: stack-buffer-overflow on address 0xfffff57a5160 at pc 0x0000004e9ef4 bp 0xfffff57a5030 sp 0xfffff57a5020 READ of size 8 at 0xfffff57a5160 thread T0 #0 0x4e9ef0 in keccakx2_absorb.constprop.1 (/data/users/mingtao/3/oqsrepro/buildopt/oqsrepro+0x4e9ef0) open-quantum-safe#1 0x4a608c in PQCLEAN_KYBER512_AARCH64_neon_kyber_shake128_absorb (/data/users/mingtao/3/oqsrepro/buildopt/oqsrepro+0x4a608c) open-quantum-safe#2 0x4a51a8 in PQCLEAN_KYBER512_AARCH64_gen_matrix (/data/users/mingtao/3/oqsrepro/buildopt/oqsrepro+0x4a51a8) open-quantum-safe#3 0x4a5360 in PQCLEAN_KYBER512_AARCH64_indcpa_keypair (/data/users/mingtao/3/oqsrepro/buildopt/oqsrepro+0x4a5360) open-quantum-safe#4 0x45e460 in PQCLEAN_KYBER512_AARCH64_crypto_kem_keypair (/data/users/mingtao/3/oqsrepro/buildopt/oqsrepro+0x45e460) open-quantum-safe#5 0x4075c0 in keypair (/data/users/mingtao/3/oqsrepro/buildopt/oqsrepro+0x4075c0) open-quantum-safe#6 0x405598 in main (/data/users/mingtao/3/oqsrepro/buildopt/oqsrepro+0x405598) open-quantum-safe#7 0xfffcbbd772fc in __libc_start_call_main (/lib64/libc.so.6+0x272fc) open-quantum-safe#8 0xfffcbbd773d4 in __libc_start_main_impl (/lib64/libc.so.6+0x273d4) open-quantum-safe#9 0x40746c in _start (/data/users/mingtao/3/oqsrepro/buildopt/oqsrepro+0x40746c) Address 0xfffff57a5160 is located in stack of thread T0 at offset 64 in frame #0 0x4a5efc in PQCLEAN_KYBER512_AARCH64_neon_kyber_shake128_absorb (/data/users/mingtao/3/oqsrepro/buildopt/oqsrepro+0x4a5efc) This frame has 2 object(s): [32, 66) 'extseed1' (line 59) <== Memory access at offset 64 partially overflows this variable [112, 146) 'extseed2' (line 60) HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork (longjmp and C++ exceptions *are* supported) SUMMARY: AddressSanitizer: stack-buffer-overflow (/data/users/mingtao/3/oqsrepro/buildopt/oqsrepro+0x4e9ef0) in keccakx2_absorb.constprop.1 Shadow bytes around the buggy address: 0x200ffeaf49d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x200ffeaf49e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x200ffeaf49f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x200ffeaf4a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x200ffeaf4a10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x200ffeaf4a20: 00 00 00 00 f1 f1 f1 f1 00 00 00 00[02]f2 f2 f2 0x200ffeaf4a30: f2 f2 00 00 00 00 02 f3 f3 f3 f3 f3 00 00 00 00 0x200ffeaf4a40: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 0x200ffeaf4a50: f1 f1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x200ffeaf4a60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x200ffeaf4a70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc ==613880==ABORTING ``` This PR sidesteps this issue by ensuring that `extseed1` and `extseed2` are sized to be divisible by 8, which avoids the problematic codepath. Other alternatives considered for this PR were to modify the `keccakx2_absorb` implementation (e.g. to memcpy the remaining data into a local 8 byte buffer first) -- however this approach inhibited inlining of the absorb implementation and resulted in a call to `memcpy` which could not be optimized out due to the variable-length `inlen`. Tested with `ninja run_tests` and ensured that ASAN repro no longer fires. Co-Authored-By: Kyle Nekritz <knekritz@meta.com> Signed-off-by: Mingtao Yang <mingtao@meta.com>
xuganyu96
added a commit
to xuganyu96/liboqs
that referenced
this pull request
Apr 2, 2026
tests/test_kem "HQC-128" still fails with segmentation fault: Process 3191 stopped * thread open-quantum-safe#2, stop reason = EXC_BAD_ACCESS (code=1, address=0xc8) frame #0: 0x0000000100035088 test_kem`keccak_inc_squeeze(h="", outlen=16, s=0x0000000000000000, r=136) at xkcp_sha3.c:189:18 186 **************************************************/ 187 static void keccak_inc_squeeze(uint8_t *h, size_t outlen, 188 uint64_t *s, uint32_t r) { -> 189 while (outlen > s[25]) { 190 (*Keccak_ExtractBytes_ptr)(s, h, (unsigned int)(r - s[25]), (unsigned int)s[25]); 191 (*Keccak_Permute_ptr)(s); 192 h += s[25]; Target 0: (test_kem) stopped. * thread open-quantum-safe#2, stop reason = EXC_BAD_ACCESS (code=1, address=0xc8) * frame #0: 0x0000000100035088 test_kem`keccak_inc_squeeze(h="", outlen=16, s=0x0000000000000000, r=136) at xkcp_sha3.c:189:18 frame open-quantum-safe#1: 0x0000000100034d3c test_kem`SHA3_shake256_inc_squeeze(output="", outlen=16, state=0x0000000100048298) at xkcp_sha3.c:382:2 frame open-quantum-safe#2: 0x00000001000358dc test_kem`OQS_SHA3_shake256_inc_squeeze(output="", outlen=16, state=0x0000000100048298) at sha3.c:148:2 frame open-quantum-safe#3: 0x0000000100007924 test_kem`prng_get_bytes(output="", outlen=16) at symmetric.c:45:5 frame open-quantum-safe#4: 0x0000000100005a54 test_kem`crypto_kem_enc(c_kem="", K="", ek_kem="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem.c:123:5 frame open-quantum-safe#5: 0x000000010000306c test_kem`OQS_KEM_hqc_128_encaps(ciphertext="", shared_secret="", public_key="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem_hqc_128.c:61:22 frame open-quantum-safe#6: 0x00000001000374dc test_kem`OQS_KEM_encaps(kem=0x0000000100aed6e0, ciphertext="", shared_secret="", public_key="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem.c:653:10 frame open-quantum-safe#7: 0x00000001000014fc test_kem`kem_test_correctness(method_name="HQC-128", derand=false) at test_kem.c:253:8 frame open-quantum-safe#8: 0x0000000100000e94 test_kem`test_wrapper(arg=0x000000016fdfe3b8) at test_kem.c:378:11 frame open-quantum-safe#9: 0x000000018d86bc58 libsystem_pthread.dylib`_pthread_start + 136 Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
xuganyu96
added a commit
to xuganyu96/liboqs
that referenced
this pull request
Apr 6, 2026
tests/test_kem "HQC-128" still fails with segmentation fault: Process 3191 stopped * thread open-quantum-safe#2, stop reason = EXC_BAD_ACCESS (code=1, address=0xc8) frame #0: 0x0000000100035088 test_kem`keccak_inc_squeeze(h="", outlen=16, s=0x0000000000000000, r=136) at xkcp_sha3.c:189:18 186 **************************************************/ 187 static void keccak_inc_squeeze(uint8_t *h, size_t outlen, 188 uint64_t *s, uint32_t r) { -> 189 while (outlen > s[25]) { 190 (*Keccak_ExtractBytes_ptr)(s, h, (unsigned int)(r - s[25]), (unsigned int)s[25]); 191 (*Keccak_Permute_ptr)(s); 192 h += s[25]; Target 0: (test_kem) stopped. * thread open-quantum-safe#2, stop reason = EXC_BAD_ACCESS (code=1, address=0xc8) * frame #0: 0x0000000100035088 test_kem`keccak_inc_squeeze(h="", outlen=16, s=0x0000000000000000, r=136) at xkcp_sha3.c:189:18 frame open-quantum-safe#1: 0x0000000100034d3c test_kem`SHA3_shake256_inc_squeeze(output="", outlen=16, state=0x0000000100048298) at xkcp_sha3.c:382:2 frame open-quantum-safe#2: 0x00000001000358dc test_kem`OQS_SHA3_shake256_inc_squeeze(output="", outlen=16, state=0x0000000100048298) at sha3.c:148:2 frame open-quantum-safe#3: 0x0000000100007924 test_kem`prng_get_bytes(output="", outlen=16) at symmetric.c:45:5 frame open-quantum-safe#4: 0x0000000100005a54 test_kem`crypto_kem_enc(c_kem="", K="", ek_kem="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem.c:123:5 frame open-quantum-safe#5: 0x000000010000306c test_kem`OQS_KEM_hqc_128_encaps(ciphertext="", shared_secret="", public_key="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem_hqc_128.c:61:22 frame open-quantum-safe#6: 0x00000001000374dc test_kem`OQS_KEM_encaps(kem=0x0000000100aed6e0, ciphertext="", shared_secret="", public_key="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem.c:653:10 frame open-quantum-safe#7: 0x00000001000014fc test_kem`kem_test_correctness(method_name="HQC-128", derand=false) at test_kem.c:253:8 frame open-quantum-safe#8: 0x0000000100000e94 test_kem`test_wrapper(arg=0x000000016fdfe3b8) at test_kem.c:378:11 frame open-quantum-safe#9: 0x000000018d86bc58 libsystem_pthread.dylib`_pthread_start + 136 Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
xuganyu96
added a commit
that referenced
this pull request
Apr 14, 2026
tests/test_kem "HQC-128" still fails with segmentation fault: Process 3191 stopped * thread #2, stop reason = EXC_BAD_ACCESS (code=1, address=0xc8) frame #0: 0x0000000100035088 test_kem`keccak_inc_squeeze(h="", outlen=16, s=0x0000000000000000, r=136) at xkcp_sha3.c:189:18 186 **************************************************/ 187 static void keccak_inc_squeeze(uint8_t *h, size_t outlen, 188 uint64_t *s, uint32_t r) { -> 189 while (outlen > s[25]) { 190 (*Keccak_ExtractBytes_ptr)(s, h, (unsigned int)(r - s[25]), (unsigned int)s[25]); 191 (*Keccak_Permute_ptr)(s); 192 h += s[25]; Target 0: (test_kem) stopped. * thread #2, stop reason = EXC_BAD_ACCESS (code=1, address=0xc8) * frame #0: 0x0000000100035088 test_kem`keccak_inc_squeeze(h="", outlen=16, s=0x0000000000000000, r=136) at xkcp_sha3.c:189:18 frame #1: 0x0000000100034d3c test_kem`SHA3_shake256_inc_squeeze(output="", outlen=16, state=0x0000000100048298) at xkcp_sha3.c:382:2 frame #2: 0x00000001000358dc test_kem`OQS_SHA3_shake256_inc_squeeze(output="", outlen=16, state=0x0000000100048298) at sha3.c:148:2 frame #3: 0x0000000100007924 test_kem`prng_get_bytes(output="", outlen=16) at symmetric.c:45:5 frame #4: 0x0000000100005a54 test_kem`crypto_kem_enc(c_kem="", K="", ek_kem="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem.c:123:5 frame #5: 0x000000010000306c test_kem`OQS_KEM_hqc_128_encaps(ciphertext="", shared_secret="", public_key="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem_hqc_128.c:61:22 frame #6: 0x00000001000374dc test_kem`OQS_KEM_encaps(kem=0x0000000100aed6e0, ciphertext="", shared_secret="", public_key="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem.c:653:10 frame #7: 0x00000001000014fc test_kem`kem_test_correctness(method_name="HQC-128", derand=false) at test_kem.c:253:8 frame #8: 0x0000000100000e94 test_kem`test_wrapper(arg=0x000000016fdfe3b8) at test_kem.c:378:11 frame #9: 0x000000018d86bc58 libsystem_pthread.dylib`_pthread_start + 136 Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
xuganyu96
added a commit
that referenced
this pull request
Apr 15, 2026
tests/test_kem "HQC-128" still fails with segmentation fault: Process 3191 stopped * thread #2, stop reason = EXC_BAD_ACCESS (code=1, address=0xc8) frame #0: 0x0000000100035088 test_kem`keccak_inc_squeeze(h="", outlen=16, s=0x0000000000000000, r=136) at xkcp_sha3.c:189:18 186 **************************************************/ 187 static void keccak_inc_squeeze(uint8_t *h, size_t outlen, 188 uint64_t *s, uint32_t r) { -> 189 while (outlen > s[25]) { 190 (*Keccak_ExtractBytes_ptr)(s, h, (unsigned int)(r - s[25]), (unsigned int)s[25]); 191 (*Keccak_Permute_ptr)(s); 192 h += s[25]; Target 0: (test_kem) stopped. * thread #2, stop reason = EXC_BAD_ACCESS (code=1, address=0xc8) * frame #0: 0x0000000100035088 test_kem`keccak_inc_squeeze(h="", outlen=16, s=0x0000000000000000, r=136) at xkcp_sha3.c:189:18 frame #1: 0x0000000100034d3c test_kem`SHA3_shake256_inc_squeeze(output="", outlen=16, state=0x0000000100048298) at xkcp_sha3.c:382:2 frame #2: 0x00000001000358dc test_kem`OQS_SHA3_shake256_inc_squeeze(output="", outlen=16, state=0x0000000100048298) at sha3.c:148:2 frame #3: 0x0000000100007924 test_kem`prng_get_bytes(output="", outlen=16) at symmetric.c:45:5 frame #4: 0x0000000100005a54 test_kem`crypto_kem_enc(c_kem="", K="", ek_kem="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem.c:123:5 frame #5: 0x000000010000306c test_kem`OQS_KEM_hqc_128_encaps(ciphertext="", shared_secret="", public_key="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem_hqc_128.c:61:22 frame #6: 0x00000001000374dc test_kem`OQS_KEM_encaps(kem=0x0000000100aed6e0, ciphertext="", shared_secret="", public_key="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem.c:653:10 frame #7: 0x00000001000014fc test_kem`kem_test_correctness(method_name="HQC-128", derand=false) at test_kem.c:253:8 frame #8: 0x0000000100000e94 test_kem`test_wrapper(arg=0x000000016fdfe3b8) at test_kem.c:378:11 frame #9: 0x000000018d86bc58 libsystem_pthread.dylib`_pthread_start + 136 Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
xuganyu96
added a commit
that referenced
this pull request
Apr 21, 2026
tests/test_kem "HQC-128" still fails with segmentation fault: Process 3191 stopped * thread #2, stop reason = EXC_BAD_ACCESS (code=1, address=0xc8) frame #0: 0x0000000100035088 test_kem`keccak_inc_squeeze(h="", outlen=16, s=0x0000000000000000, r=136) at xkcp_sha3.c:189:18 186 **************************************************/ 187 static void keccak_inc_squeeze(uint8_t *h, size_t outlen, 188 uint64_t *s, uint32_t r) { -> 189 while (outlen > s[25]) { 190 (*Keccak_ExtractBytes_ptr)(s, h, (unsigned int)(r - s[25]), (unsigned int)s[25]); 191 (*Keccak_Permute_ptr)(s); 192 h += s[25]; Target 0: (test_kem) stopped. * thread #2, stop reason = EXC_BAD_ACCESS (code=1, address=0xc8) * frame #0: 0x0000000100035088 test_kem`keccak_inc_squeeze(h="", outlen=16, s=0x0000000000000000, r=136) at xkcp_sha3.c:189:18 frame #1: 0x0000000100034d3c test_kem`SHA3_shake256_inc_squeeze(output="", outlen=16, state=0x0000000100048298) at xkcp_sha3.c:382:2 frame #2: 0x00000001000358dc test_kem`OQS_SHA3_shake256_inc_squeeze(output="", outlen=16, state=0x0000000100048298) at sha3.c:148:2 frame #3: 0x0000000100007924 test_kem`prng_get_bytes(output="", outlen=16) at symmetric.c:45:5 frame #4: 0x0000000100005a54 test_kem`crypto_kem_enc(c_kem="", K="", ek_kem="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem.c:123:5 frame #5: 0x000000010000306c test_kem`OQS_KEM_hqc_128_encaps(ciphertext="", shared_secret="", public_key="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem_hqc_128.c:61:22 frame #6: 0x00000001000374dc test_kem`OQS_KEM_encaps(kem=0x0000000100aed6e0, ciphertext="", shared_secret="", public_key="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem.c:653:10 frame #7: 0x00000001000014fc test_kem`kem_test_correctness(method_name="HQC-128", derand=false) at test_kem.c:253:8 frame #8: 0x0000000100000e94 test_kem`test_wrapper(arg=0x000000016fdfe3b8) at test_kem.c:378:11 frame #9: 0x000000018d86bc58 libsystem_pthread.dylib`_pthread_start + 136 Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
xuganyu96
added a commit
that referenced
this pull request
Apr 21, 2026
tests/test_kem "HQC-128" still fails with segmentation fault: Process 3191 stopped * thread #2, stop reason = EXC_BAD_ACCESS (code=1, address=0xc8) frame #0: 0x0000000100035088 test_kem`keccak_inc_squeeze(h="", outlen=16, s=0x0000000000000000, r=136) at xkcp_sha3.c:189:18 186 **************************************************/ 187 static void keccak_inc_squeeze(uint8_t *h, size_t outlen, 188 uint64_t *s, uint32_t r) { -> 189 while (outlen > s[25]) { 190 (*Keccak_ExtractBytes_ptr)(s, h, (unsigned int)(r - s[25]), (unsigned int)s[25]); 191 (*Keccak_Permute_ptr)(s); 192 h += s[25]; Target 0: (test_kem) stopped. * thread #2, stop reason = EXC_BAD_ACCESS (code=1, address=0xc8) * frame #0: 0x0000000100035088 test_kem`keccak_inc_squeeze(h="", outlen=16, s=0x0000000000000000, r=136) at xkcp_sha3.c:189:18 frame #1: 0x0000000100034d3c test_kem`SHA3_shake256_inc_squeeze(output="", outlen=16, state=0x0000000100048298) at xkcp_sha3.c:382:2 frame #2: 0x00000001000358dc test_kem`OQS_SHA3_shake256_inc_squeeze(output="", outlen=16, state=0x0000000100048298) at sha3.c:148:2 frame #3: 0x0000000100007924 test_kem`prng_get_bytes(output="", outlen=16) at symmetric.c:45:5 frame #4: 0x0000000100005a54 test_kem`crypto_kem_enc(c_kem="", K="", ek_kem="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem.c:123:5 frame #5: 0x000000010000306c test_kem`OQS_KEM_hqc_128_encaps(ciphertext="", shared_secret="", public_key="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem_hqc_128.c:61:22 frame #6: 0x00000001000374dc test_kem`OQS_KEM_encaps(kem=0x0000000100aed6e0, ciphertext="", shared_secret="", public_key="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem.c:653:10 frame #7: 0x00000001000014fc test_kem`kem_test_correctness(method_name="HQC-128", derand=false) at test_kem.c:253:8 frame #8: 0x0000000100000e94 test_kem`test_wrapper(arg=0x000000016fdfe3b8) at test_kem.c:378:11 frame #9: 0x000000018d86bc58 libsystem_pthread.dylib`_pthread_start + 136 Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
xuganyu96
added a commit
that referenced
this pull request
Apr 21, 2026
tests/test_kem "HQC-128" still fails with segmentation fault: Process 3191 stopped * thread #2, stop reason = EXC_BAD_ACCESS (code=1, address=0xc8) frame #0: 0x0000000100035088 test_kem`keccak_inc_squeeze(h="", outlen=16, s=0x0000000000000000, r=136) at xkcp_sha3.c:189:18 186 **************************************************/ 187 static void keccak_inc_squeeze(uint8_t *h, size_t outlen, 188 uint64_t *s, uint32_t r) { -> 189 while (outlen > s[25]) { 190 (*Keccak_ExtractBytes_ptr)(s, h, (unsigned int)(r - s[25]), (unsigned int)s[25]); 191 (*Keccak_Permute_ptr)(s); 192 h += s[25]; Target 0: (test_kem) stopped. * thread #2, stop reason = EXC_BAD_ACCESS (code=1, address=0xc8) * frame #0: 0x0000000100035088 test_kem`keccak_inc_squeeze(h="", outlen=16, s=0x0000000000000000, r=136) at xkcp_sha3.c:189:18 frame #1: 0x0000000100034d3c test_kem`SHA3_shake256_inc_squeeze(output="", outlen=16, state=0x0000000100048298) at xkcp_sha3.c:382:2 frame #2: 0x00000001000358dc test_kem`OQS_SHA3_shake256_inc_squeeze(output="", outlen=16, state=0x0000000100048298) at sha3.c:148:2 frame #3: 0x0000000100007924 test_kem`prng_get_bytes(output="", outlen=16) at symmetric.c:45:5 frame #4: 0x0000000100005a54 test_kem`crypto_kem_enc(c_kem="", K="", ek_kem="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem.c:123:5 frame #5: 0x000000010000306c test_kem`OQS_KEM_hqc_128_encaps(ciphertext="", shared_secret="", public_key="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem_hqc_128.c:61:22 frame #6: 0x00000001000374dc test_kem`OQS_KEM_encaps(kem=0x0000000100aed6e0, ciphertext="", shared_secret="", public_key="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem.c:653:10 frame #7: 0x00000001000014fc test_kem`kem_test_correctness(method_name="HQC-128", derand=false) at test_kem.c:253:8 frame #8: 0x0000000100000e94 test_kem`test_wrapper(arg=0x000000016fdfe3b8) at test_kem.c:378:11 frame #9: 0x000000018d86bc58 libsystem_pthread.dylib`_pthread_start + 136 Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
xuganyu96
added a commit
that referenced
this pull request
Apr 24, 2026
tests/test_kem "HQC-128" still fails with segmentation fault: Process 3191 stopped * thread #2, stop reason = EXC_BAD_ACCESS (code=1, address=0xc8) frame #0: 0x0000000100035088 test_kem`keccak_inc_squeeze(h="", outlen=16, s=0x0000000000000000, r=136) at xkcp_sha3.c:189:18 186 **************************************************/ 187 static void keccak_inc_squeeze(uint8_t *h, size_t outlen, 188 uint64_t *s, uint32_t r) { -> 189 while (outlen > s[25]) { 190 (*Keccak_ExtractBytes_ptr)(s, h, (unsigned int)(r - s[25]), (unsigned int)s[25]); 191 (*Keccak_Permute_ptr)(s); 192 h += s[25]; Target 0: (test_kem) stopped. * thread #2, stop reason = EXC_BAD_ACCESS (code=1, address=0xc8) * frame #0: 0x0000000100035088 test_kem`keccak_inc_squeeze(h="", outlen=16, s=0x0000000000000000, r=136) at xkcp_sha3.c:189:18 frame #1: 0x0000000100034d3c test_kem`SHA3_shake256_inc_squeeze(output="", outlen=16, state=0x0000000100048298) at xkcp_sha3.c:382:2 frame #2: 0x00000001000358dc test_kem`OQS_SHA3_shake256_inc_squeeze(output="", outlen=16, state=0x0000000100048298) at sha3.c:148:2 frame #3: 0x0000000100007924 test_kem`prng_get_bytes(output="", outlen=16) at symmetric.c:45:5 frame #4: 0x0000000100005a54 test_kem`crypto_kem_enc(c_kem="", K="", ek_kem="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem.c:123:5 frame #5: 0x000000010000306c test_kem`OQS_KEM_hqc_128_encaps(ciphertext="", shared_secret="", public_key="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem_hqc_128.c:61:22 frame #6: 0x00000001000374dc test_kem`OQS_KEM_encaps(kem=0x0000000100aed6e0, ciphertext="", shared_secret="", public_key="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem.c:653:10 frame #7: 0x00000001000014fc test_kem`kem_test_correctness(method_name="HQC-128", derand=false) at test_kem.c:253:8 frame #8: 0x0000000100000e94 test_kem`test_wrapper(arg=0x000000016fdfe3b8) at test_kem.c:378:11 frame #9: 0x000000018d86bc58 libsystem_pthread.dylib`_pthread_start + 136 Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
xuganyu96
added a commit
that referenced
this pull request
May 18, 2026
tests/test_kem "HQC-128" still fails with segmentation fault: Process 3191 stopped * thread #2, stop reason = EXC_BAD_ACCESS (code=1, address=0xc8) frame #0: 0x0000000100035088 test_kem`keccak_inc_squeeze(h="", outlen=16, s=0x0000000000000000, r=136) at xkcp_sha3.c:189:18 186 **************************************************/ 187 static void keccak_inc_squeeze(uint8_t *h, size_t outlen, 188 uint64_t *s, uint32_t r) { -> 189 while (outlen > s[25]) { 190 (*Keccak_ExtractBytes_ptr)(s, h, (unsigned int)(r - s[25]), (unsigned int)s[25]); 191 (*Keccak_Permute_ptr)(s); 192 h += s[25]; Target 0: (test_kem) stopped. * thread #2, stop reason = EXC_BAD_ACCESS (code=1, address=0xc8) * frame #0: 0x0000000100035088 test_kem`keccak_inc_squeeze(h="", outlen=16, s=0x0000000000000000, r=136) at xkcp_sha3.c:189:18 frame #1: 0x0000000100034d3c test_kem`SHA3_shake256_inc_squeeze(output="", outlen=16, state=0x0000000100048298) at xkcp_sha3.c:382:2 frame #2: 0x00000001000358dc test_kem`OQS_SHA3_shake256_inc_squeeze(output="", outlen=16, state=0x0000000100048298) at sha3.c:148:2 frame #3: 0x0000000100007924 test_kem`prng_get_bytes(output="", outlen=16) at symmetric.c:45:5 frame #4: 0x0000000100005a54 test_kem`crypto_kem_enc(c_kem="", K="", ek_kem="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem.c:123:5 frame #5: 0x000000010000306c test_kem`OQS_KEM_hqc_128_encaps(ciphertext="", shared_secret="", public_key="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem_hqc_128.c:61:22 frame #6: 0x00000001000374dc test_kem`OQS_KEM_encaps(kem=0x0000000100aed6e0, ciphertext="", shared_secret="", public_key="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem.c:653:10 frame #7: 0x00000001000014fc test_kem`kem_test_correctness(method_name="HQC-128", derand=false) at test_kem.c:253:8 frame #8: 0x0000000100000e94 test_kem`test_wrapper(arg=0x000000016fdfe3b8) at test_kem.c:378:11 frame #9: 0x000000018d86bc58 libsystem_pthread.dylib`_pthread_start + 136 Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
xuganyu96
added a commit
that referenced
this pull request
May 20, 2026
tests/test_kem "HQC-128" still fails with segmentation fault: Process 3191 stopped * thread #2, stop reason = EXC_BAD_ACCESS (code=1, address=0xc8) frame #0: 0x0000000100035088 test_kem`keccak_inc_squeeze(h="", outlen=16, s=0x0000000000000000, r=136) at xkcp_sha3.c:189:18 186 **************************************************/ 187 static void keccak_inc_squeeze(uint8_t *h, size_t outlen, 188 uint64_t *s, uint32_t r) { -> 189 while (outlen > s[25]) { 190 (*Keccak_ExtractBytes_ptr)(s, h, (unsigned int)(r - s[25]), (unsigned int)s[25]); 191 (*Keccak_Permute_ptr)(s); 192 h += s[25]; Target 0: (test_kem) stopped. * thread #2, stop reason = EXC_BAD_ACCESS (code=1, address=0xc8) * frame #0: 0x0000000100035088 test_kem`keccak_inc_squeeze(h="", outlen=16, s=0x0000000000000000, r=136) at xkcp_sha3.c:189:18 frame #1: 0x0000000100034d3c test_kem`SHA3_shake256_inc_squeeze(output="", outlen=16, state=0x0000000100048298) at xkcp_sha3.c:382:2 frame #2: 0x00000001000358dc test_kem`OQS_SHA3_shake256_inc_squeeze(output="", outlen=16, state=0x0000000100048298) at sha3.c:148:2 frame #3: 0x0000000100007924 test_kem`prng_get_bytes(output="", outlen=16) at symmetric.c:45:5 frame #4: 0x0000000100005a54 test_kem`crypto_kem_enc(c_kem="", K="", ek_kem="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem.c:123:5 frame #5: 0x000000010000306c test_kem`OQS_KEM_hqc_128_encaps(ciphertext="", shared_secret="", public_key="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem_hqc_128.c:61:22 frame #6: 0x00000001000374dc test_kem`OQS_KEM_encaps(kem=0x0000000100aed6e0, ciphertext="", shared_secret="", public_key="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem.c:653:10 frame #7: 0x00000001000014fc test_kem`kem_test_correctness(method_name="HQC-128", derand=false) at test_kem.c:253:8 frame #8: 0x0000000100000e94 test_kem`test_wrapper(arg=0x000000016fdfe3b8) at test_kem.c:378:11 frame #9: 0x000000018d86bc58 libsystem_pthread.dylib`_pthread_start + 136 Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
xuganyu96
added a commit
that referenced
this pull request
May 22, 2026
tests/test_kem "HQC-128" still fails with segmentation fault: Process 3191 stopped * thread #2, stop reason = EXC_BAD_ACCESS (code=1, address=0xc8) frame #0: 0x0000000100035088 test_kem`keccak_inc_squeeze(h="", outlen=16, s=0x0000000000000000, r=136) at xkcp_sha3.c:189:18 186 **************************************************/ 187 static void keccak_inc_squeeze(uint8_t *h, size_t outlen, 188 uint64_t *s, uint32_t r) { -> 189 while (outlen > s[25]) { 190 (*Keccak_ExtractBytes_ptr)(s, h, (unsigned int)(r - s[25]), (unsigned int)s[25]); 191 (*Keccak_Permute_ptr)(s); 192 h += s[25]; Target 0: (test_kem) stopped. * thread #2, stop reason = EXC_BAD_ACCESS (code=1, address=0xc8) * frame #0: 0x0000000100035088 test_kem`keccak_inc_squeeze(h="", outlen=16, s=0x0000000000000000, r=136) at xkcp_sha3.c:189:18 frame #1: 0x0000000100034d3c test_kem`SHA3_shake256_inc_squeeze(output="", outlen=16, state=0x0000000100048298) at xkcp_sha3.c:382:2 frame #2: 0x00000001000358dc test_kem`OQS_SHA3_shake256_inc_squeeze(output="", outlen=16, state=0x0000000100048298) at sha3.c:148:2 frame #3: 0x0000000100007924 test_kem`prng_get_bytes(output="", outlen=16) at symmetric.c:45:5 frame #4: 0x0000000100005a54 test_kem`crypto_kem_enc(c_kem="", K="", ek_kem="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem.c:123:5 frame #5: 0x000000010000306c test_kem`OQS_KEM_hqc_128_encaps(ciphertext="", shared_secret="", public_key="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem_hqc_128.c:61:22 frame #6: 0x00000001000374dc test_kem`OQS_KEM_encaps(kem=0x0000000100aed6e0, ciphertext="", shared_secret="", public_key="'x\U00000015\x88\xf6\U0000000f\xf0\xce\U000000101\a፵e\xfe\x92~\r\xb7sSZ\xc4\U0000000e\xd2\xda\xd9%պ\x8e\xee-\xf9\xe07<@v\n\xe6w\x8d?\xe6B\xb7\xb9X\x8b\xae\x86nr@\xcdr!\xd3\U00000002'+[\U00000011\U0000001f\xb0\x8e\xcc\xd0Zl\xd3\xd8-\U00000001Im\xfft\x9b\x9d]\xa2\xd2Nu0\x83\xce}D$\\\xe8o,\x99\x99D\x8c\xb4\U00000016\xb5\xb5\xbd\xfaĸkA Ao\x94」Yb\a\xcfa\U0000001dQ:\U00000018\xe5\x8cI\xbd/\xd9U\xcb\xe9\U00000019\xb9JD\xfc\x86^\xf6W\U00000016\xa9xz3G\x95\x97Hs5\xc2\U00000001I\xa3\x9c\xd7\xf2\U0000000f\xf8\U00000005\xeb\x92{\xfc\x9fa\U00000018O\x96\xf8\xa7tH[") at kem.c:653:10 frame #7: 0x00000001000014fc test_kem`kem_test_correctness(method_name="HQC-128", derand=false) at test_kem.c:253:8 frame #8: 0x0000000100000e94 test_kem`test_wrapper(arg=0x000000016fdfe3b8) at test_kem.c:378:11 frame #9: 0x000000018d86bc58 libsystem_pthread.dylib`_pthread_start + 136 Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added the flag CRYPT_VERIFYCONTEXT in the CryptAcquireContext call to prevent an error if the current user's key container is unavailable (which is the case when you start a fresh VM); better anyway because we don't actually need the key container to only obtain randomness.