Open bobgus opened 7 years ago
I took a look at the travis-cl.org link and he is getting the exact same error.
The routine 'finalize' is having a problem. I put an echo statement in the code
(and it appears that the nil problem is occurring at the end of the calling list. No problem with finalize with earlier items in the list.) bogus - was looking at wrong test
I commented out that whole test and everything else runs to completion.
@bobgus I temporarily disabled the failing tests and now Travis CI is successful. Not having an OS X at hand makes the troubleshooting tricky.
Yes, that is what I did. It certainly kills the errors.
Perhaps the real solution to the problem (if there really is one) is to wait for another version of nim, clang, or macOS.
The error does not show on Linux?
I was looking at the previous test - with the loop. The line 168 error is coming from the next test. Since the key string starts out with nil (see line 165), perhaps the error is the 'expected' error.
It could be a more graceful test by surrounding line 168 with a try: except: with appropriate filter and assert. It could also echo "nil in key string detected"..
The try: except: also needs to be in the libsodium/sodium.nim around line 621, something like:
try:
rc = crypto_generichash_final(s, h, h_len)
except:
raise
I get a strange complaint:
libsodium/sodium.nim(621, 5) Error: identifier expected, but found 'keyword try'
The cause of this error is not so obvious to me at the moment.
@bobgus was the try/except under the "let" block? It should be outside
Yes, indented as if it were part of the "let" block.
I moved it out of the let and now things are working more rationally, but I haven't figured out everything. I am reading and learning more of your code. An educational opportunity...
I did uninstall/install of lib sodium.
I took off the skip and # from generic multipart hashing
and the test works fine (my bogus flailing from before made it suspect)
[OK] generic multipart hashing
The generic multipart hashing key = nil
is still a problem.
Traceback (most recent call last)
test_sodium.nim(169) test_sodium
sodium.nim(621) finalize
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
When I compile and run the
test_sodium.nim
program from the libsodium nimble pkg directory:nim c -r ~/.nimble/pkgs/libsodium-0.1.0/test_sodium.nim
I get an error:
I'm not sure this is a bug, or just that something is missing when compiling and running out of the pkgs directory.