LKedward / fhash

fpm package implementing a hash table with support for generic keys and values.
https://lkedward.github.io/fhash/
MIT License
38 stars 8 forks source link

Issues on Windows/MacOS for release build #11

Closed LKedward closed 3 years ago

LKedward commented 3 years ago

When built in release mode on Windows with gfortran 8.1.0 and MacOS with gfortran 9.3.0, the hashing testsuite fails. See github actions output.

On MacOS the tests run to completion but fail, e.g.:

# Starting int32-hashing ... (3/6)
#     ...int32-hashing                 [FAILED]
#Message:String hash check failed for 32bit integer "           0"
 expected "4B95F515" but got "FFFFFFFF"

On Windows, the tests encounter the same failure as above but segfault in the SLL testsuite before completing.

NB. All tests and demos run fine on Ubuntu with gfortran 9.3.0 when built in release mode.

Edit: Looks like the problem is with int64 overflow behaviour in optimised builds. Failing builds are not wrapping round, but ceiling at huge(int64). Should rewrite hash implementations in C with proper unsigned ints.