Branch: Tag:

2016-01-04

2016-01-04 19:30:05 by Tobias S. Josefowitz <tobij@tobij.de>

random(): valgrind chokes on the random intrinsics instruction

A bug about this has been filed against valgrind, but for now we stay
away from random intrinsics if running inside valgrind.

8:   #include "stuff.h"   #include "bitvector.h"   #include "pike_cpulib.h" + #include "pike_memory.h"      /* Used by is8bitalnum in pike_macros.h. */   PMOD_EXPORT const char Pike_is8bitalnum_vector[] =
137: Inside #if HAS___BUILTIN_IA32_RDRAND32_STEP
  {   #if HAS___BUILTIN_IA32_RDRAND32_STEP    unsigned int ignore, cpuid_ecx; +  +  /* NOTE: some versions of valgrind falsely advertise +  * RDRAND support in cpuid. +  */ + # if defined(USE_VALGRIND) +  if (!PIKE_MEM_CHECKER()) + # endif    if( !use_rdrnd )    {    INT32 cpuid[4];