Closed lulcat closed 1 month ago
This is caused by this GCC bug.
Cheers. I usually am on a distant cousin or superset to arch linux although ssp doesn't have to be on/default. Nevertheless, I am on an arch like thing momentarily for a while and it's just so buggy. (endeavour or so). But still, compiler bugs are compiler bugs. I have my fair share of experience of using too experimental versions so I prefer using stable versions now. This fix isn't out yet on this os though but good to know. I'll keep an eye on it. I think I was the first to adopt your blake3 as default into a package manager already just a fortnight after it was released on github. I know, not smart to take something entirely unvetted as a default security wise but blake2 was already held on great regard.
EDIT: this can be closed by the way.
Hi. on a Ryzen 7*** series, if relevant, I got during make -f Makefile.testing test in the c sub-directory:
Testing 0x00000060 AddressSanitizer:DEADLYSIGNAL
==37697==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x64ae1f0fefa4 bp 0x7fff4ee2f970 sp 0x7fff4ee2d200 T0) ==37697==The signal is caused by a READ memory access. ==37697==Hint: this fault was caused by a dereference of a high value address (see register values below). Disassemble the provided pc to learn which register was used.
0 0x64ae1f0fefa4 in blake3_hash16_avx512 (/BLAKE3/c/blake3+0x131fa4) (BuildId: 437efdf9a18d03604553d6113dbee7c8a062baaa)
AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (/BLAKE3/c/blake3+0x131fa4) (BuildId: 437efdf9a18d03604553d6113dbee7c8a062baaa) in blake3_hash16_avx512 ==37697==ABORTING Traceback (most recent call last): File "/BLAKE3/c/./test.py", line 97, in
main()
File "/BLAKE3/c/./test.py", line 48, in main
test_hash = run_blake3([], input)
^^^^^^^^^^^^^^^^^^^^^
File "/BLAKE3/c/./test.py", line 14, in run_blake3
output = subprocess.run([path.join(HERE, "blake3")] + args,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/BLAKE3/c/./blake3']' returned non-zero exit status 1.
make: *** [Makefile.testing:69: test] Error 1
I did not go through any of the .S files, but only one .c file: throwing up the diff in case you want to check/look thorugh, address it. This was first and only attempt at auditing the fix, so upstream needs to verify if the case of exactly 16 left should be in the other condition.
DIFF: (mind you, I don't know how to use web html for formatting is it three backticks for \