Skip to content

Feature/isaac #3997

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Feature/isaac #3997

wants to merge 2 commits into from

Conversation

jesse99
Copy link
Contributor

@jesse99 jesse99 commented Nov 18, 2012

Improve error checking in isaac_seed.

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.

Closes rust-lang#3679.
They shouldn't matter but there have been errors on Macs so logging
them may help root cause the issue.
@brson
Copy link
Contributor

brson commented Nov 18, 2012

I am worried about this error closing /dev/urandom. I think that it makes sense to not make this a fatal error (for now), since it's important that random number generation works, but I don't want to consider this problem fixed by ignoring it. If we close #3679 can we open another one to figure out why this call is failing, and add a FIXME to the code?

@jesse99
Copy link
Contributor Author

jesse99 commented Nov 18, 2012

It's a weird one: close failing shouldn't affect the results that we got when reading which is all that we really care about. On the other hand close shouldn't be failing so there does some to be something going on that is ill understood and maybe it can affect seeding.

Given this I'm fine with leaving the issue open. Adding a FIXME recommending for checking for close errors again sounds fine too.

@brson
Copy link
Contributor

brson commented Nov 26, 2012

Merged. Thanks.

@brson brson closed this Nov 26, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants