I've been chasing a bug that led to corruption of the buffer containing the configuration file name during startup of extrae, leading to something like:
I/O warning : failed to load external entity "�"
Extrae: Detected GOMP version is 4.5
I/O warning : Extrae: Detected and hooked OpenMP runtime: [Intel KMPC] [GNU GOMP]
failed to load external entity "�"
After some debugging I found that the ia32 clock initialization is corrupting the memory and the reason seems to be the following lines in ia32_Initialize:
Note that if fread reads exactly 32k bytes the write access in the last line is out-of-bounds. Indeed the size of /proc/cpuinfo is larger than 32k on our system:
Changing the line to buffer[ bytes_read-1 ] = '\0'; seems to prevent the memory from getting corrupted and leads to successful parsing of the config file.
Also note that the same problem exists in the ia64 and ppc implementations.
I've been chasing a bug that led to corruption of the buffer containing the configuration file name during startup of extrae, leading to something like:
After some debugging I found that the ia32 clock initialization is corrupting the memory and the reason seems to be the following lines in
ia32_Initialize
:Note that if
fread
reads exactly 32k bytes the write access in the last line is out-of-bounds. Indeed the size of/proc/cpuinfo
is larger than 32k on our system:Changing the line to
buffer[ bytes_read-1 ] = '\0';
seems to prevent the memory from getting corrupted and leads to successful parsing of the config file.Also note that the same problem exists in the
ia64
andppc
implementations.