mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-01 16:26:29 +00:00
Revert "Insert random noops to increase security against ROP attacks (llvm)"
This reverts commit: http://reviews.llvm.org/D3392 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225948 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -31,20 +31,8 @@ namespace llvm {
|
||||
/// module.
|
||||
class RandomNumberGenerator {
|
||||
public:
|
||||
typedef std::mt19937_64 RNG;
|
||||
typedef RNG::result_type result_type;
|
||||
|
||||
/// Returns a random number in the range [0, Max).
|
||||
result_type operator()();
|
||||
|
||||
// Must define min and max to be compatible with URNG as used by
|
||||
// std::uniform_*_distribution
|
||||
static LLVM_CONSTEXPR result_type min() {
|
||||
return RNG::min();
|
||||
}
|
||||
static LLVM_CONSTEXPR result_type max() {
|
||||
return RNG::max();
|
||||
}
|
||||
uint_fast64_t operator()();
|
||||
|
||||
private:
|
||||
/// Seeds and salts the underlying RNG engine.
|
||||
@@ -57,7 +45,7 @@ private:
|
||||
// http://en.cppreference.com/w/cpp/numeric/random/mersenne_twister_engine
|
||||
// This RNG is deterministically portable across C++11
|
||||
// implementations.
|
||||
RNG Generator;
|
||||
std::mt19937_64 Generator;
|
||||
|
||||
// Noncopyable.
|
||||
RandomNumberGenerator(const RandomNumberGenerator &other)
|
||||
|
Reference in New Issue
Block a user