altf4 / untwister

Seed recovery tool for PRNGs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

glibc rand() not threadsafe (also not portable)

altf4 opened this issue · comments

When we need a glibc rand() number, untwister just calls "rand()".

But rand() is not threadsafe, and so this fails miserably when brute-forcing with multiple threads. Also, it fails on non-GNU systems.

Rather than calling rand(), we need to copy out the actual glibc rand() code into untwister itself.

Fixed in e917995