comphelper/source/misc/random.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 300a743048de760e3a5456e8dce549af5f42b11b
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon Oct 18 12:41:36 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Oct 18 18:48:49 2021 +0200

    make RR easier to use
    
    breaks easily without the RNG being repeatable
    
    Change-Id: Ia464a04f0623668088564c7121f39f04aa68b2ab
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123740
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/comphelper/source/misc/random.cxx 
b/comphelper/source/misc/random.cxx
index c8c87888bcae..96d466641dfb 100644
--- a/comphelper/source/misc/random.cxx
+++ b/comphelper/source/misc/random.cxx
@@ -42,7 +42,8 @@ struct RandomNumberGenerator
     STD_RNG_ALGO global_rng;
     RandomNumberGenerator()
     {
-        bool bRepeatable = (getenv("SAL_RAND_REPEATABLE") != nullptr);
+        // make RR easier to use, breaks easily without the RNG being 
repeatable
+        bool bRepeatable = (getenv("SAL_RAND_REPEATABLE") != nullptr) || 
(getenv("RR") != nullptr);
         // valgrind on some platforms (e.g.Ubuntu16.04) does not support the 
new Intel RDRAND instructions,
         // which leads to "Illegal Opcode" errors, so just turn off randomness.
 #if defined HAVE_VALGRIND_HEADERS

Reply via email to