mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-29 00:21:14 +00:00
31dfaff3b3
This patch changes how linear_congruential_engine picks its randomization algorithm. It adds two restrictions, `_OverflowOK` and `_SchrageOK`. `_OverflowOK` means that m is a power of two so using the classic `(a * x + c) % m` will create a meaningless overflow. The second checks that Schrage's algorithm will produce results that are in bounds of min and max. This patch fixes https://llvm.org/PR27839. Differential Revision: D65041 |
||
---|---|---|
.. | ||
benchmarks | ||
cmake | ||
docs | ||
include | ||
lib | ||
src | ||
test | ||
utils | ||
www | ||
.clang-format | ||
.gitignore | ||
appveyor-reqs-install.cmd | ||
appveyor.yml | ||
CMakeLists.txt | ||
CREDITS.TXT | ||
LICENSE.TXT | ||
NOTES.TXT | ||
TODO.TXT |