You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Noticed the following when running my app: Assertion failed: (ret == 0), function isaac_seed, file /Users/jessejones/Source/Third_Party/rust/src/rt/rust_util.h, line 153. Doesn't seem especially reproducible.
Looking at the header:
The assert is firing when trying to close a /dev/urandom file descriptor. I can see checking for errors on a descriptor being written to (the close will often flush buffered data), but failing because close failed for reads seems a lot iffier.
All the error checking in isaac_seed (including Windows) is using asserts which seems questionable: usually those should be reserved to catch errors programmers make, not arbitrary errors the runtime will throw up (especially if those errors may be ifdef'ed out).
It'd be great if the Unix code used perror.
This was on a Mac. I note that man 2 close lists three reasons why close may fail including the perennial favorite "execution was interrupted by a signal".
The text was updated successfully, but these errors were encountered:
It's definitely intermittent, but bad enough that I wound up replacing the assert with an fwrite. Interestingly once I finally reproed it perror said that the problem was "Bad file descriptor".
1) Check for eof (shouldn't happen, but if it does we'll fall into an
infinite loop).
2) Use fatal instead of assert (will work if NDEBUG is ever defined
and provides better diagnostics).
3) Ignore errors from close since they shouldn't matter.
Closesrust-lang#3679.
Noticed the following when running my app:
Assertion failed: (ret == 0), function isaac_seed, file /Users/jessejones/Source/Third_Party/rust/src/rt/rust_util.h, line 153.
Doesn't seem especially reproducible.Looking at the header:
This was on a Mac. I note that
man 2 close
lists three reasons why close may fail including the perennial favorite "execution was interrupted by a signal".The text was updated successfully, but these errors were encountered: