Skip to content

gcc-15 causes some mischief #10

@Ondalf

Description

@Ondalf

Hi,
Seems

$ gcc --version
gcc (Alpine 15.2.0) 15.2.0

won't pass integrity tests when used -O3 unless -DNEOSCRYPT_ASM is enabled, or rather, most of the tests are failing. -O3 still works perfectly fine with gcc-12 and probably gcc-14.

-O2 every single test passes with flying colors, but seems -O3 is doing something...

Wrote a little bash script with several different build.sh alikes with own DEFINITIONS, and this was the end result with -O3:

$ ./run.sh
OPT
BLAKE2s integrity test passed.
FastKDF integrity test passed.
NeoScrypt integrity test failed!

SHA256
BLAKE2s integrity test passed.
FastKDF integrity test failed!
NeoScrypt integrity test failed!
Scrypt integrity test failed!

OPT SHA256
BLAKE2s integrity test passed.
FastKDF integrity test passed.
NeoScrypt integrity test failed!
Scrypt integrity test failed!

ASM
BLAKE2s integrity test passed.
FastKDF integrity test passed.
NeoScrypt INT integrity test passed.
NeoScrypt SSE2 integrity test passed.

ASM OPT
BLAKE2s integrity test passed.
FastKDF integrity test passed.
NeoScrypt INT integrity test passed.
NeoScrypt SSE2 integrity test passed.

ASM OPT SHA256
BLAKE2s integrity test passed.
FastKDF integrity test passed.
NeoScrypt INT integrity test passed.
NeoScrypt SSE2 integrity test passed.
Scrypt INT integrity test passed.
Scrypt SSE2 integrity test passed.

ASM SHA256
BLAKE2s integrity test passed.
FastKDF integrity test passed.
NeoScrypt INT integrity test passed.
NeoScrypt SSE2 integrity test passed.
Scrypt INT integrity test passed.
Scrypt SSE2 integrity test passed.

This was executed on Xeon E5-2696v2, so basically Ivy Bridge machine. For kicks, tested also if -march=native would confuse the compiler even more, but that didn't do anything regarding test results.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions