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:
JF Bastien
2015-01-14 05:24:33 +00:00
parent 1f6209189c
commit 7f0cbb5703
17 changed files with 4 additions and 432 deletions

View File

@@ -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)