actually OpenBSD deviated from the standard a few years ago and yields a fairly robust random generator by default. Why ? because people are idiots, so they will use rand() for... whatever, and hash-based random generators are fairly fast and secure anyway.
Putting #pragma poison for rand in default env & requiring manual override would have solved the problem without silent wrong behavior.
-
-
show us practical examples of wrong behavior, please. Not theoretical discussion. Actual programs that already exist that break silently and that we haven't fixed. As opposed to actual programs that were silently broken and that our change fixed.
-
Gimp filters. Oh, I love that effect I just got but I meant to ______ first. Let's undo and redo.
-
"Shiiiiiiit, that effect was cryptographic quality noise produced, not the deterministic sequence it was supposed to be."
-
LOL. Seriously, you saw that one happen, or are you talking out of your ass ?
-
Like, give me a specific CONCRETE filter you use in gimp that's affected by our non-deterministic random. Or it did not happen.
-
... actually, I'm going to expand on THAT. If you want a PRNG giving DETERMINISTIC RESULTS for something like gimp, you're definitely NOT GOING to want to use the libc rand(). ... Because it's not going to give you reproducible results from platform to platform.
-
Agreed. But for most users reproducibility on their own system sufficed. If sufficiently important on another you could LD_PRELOAD a replacement.
-
Bwahahaha Okay, so you admitted that predictable rand() is just a local convenience, and you're now advocating a dirty hack to make it portable. If you need reproducibility in a production setup, you shouldn't be using rand() anyway.
- 6 more replies
New conversation -
-
-
About pragma whatever: that's a joke, right ? if people were reading warning messages and fixing them, we wouldn't have sprintf's all over the place in 2017.
-
Poison is a hard error.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.