I am attempting to run benchmarks with AddressSanitizer enabled in order to study the performance overhead of memory error detection.
AddressSanitizer works fine if I compile programs with 'gcc -fsanitize=address' or 'g++ -fsanitize=address' but I can't seem to get Phoronix to use it by adding it to CFLAGS, CPPFLAGS or CXXFLAGS.
Using ubuntu I executed the commands:
CFLAGS=-fsanitize=address
export CFLAGS
CPPFLAGS=-fsanitize=address
export CPPFLAGS
CXXFLAGS=-fsanitize=address
export CXXFLAGS
and printenv seems to confirm that I set the environment variables correctly:
comp@comp-NV55C:~$ printenv CFLAGS
-fsanitize=address
comp@comp-NV55C:~$ printenv CXXFLAGS
-fsanitize=address
comp@comp-NV55C:~$ printenv CPPFLAGS
-fsanitize=address
But when I run phoronix it never reports the compiler options being any different regardless of how the environment variables are set. I'm new to this sort of work and would greatly appreciate any advice on how to get this to work. Thank you.
AddressSanitizer works fine if I compile programs with 'gcc -fsanitize=address' or 'g++ -fsanitize=address' but I can't seem to get Phoronix to use it by adding it to CFLAGS, CPPFLAGS or CXXFLAGS.
Using ubuntu I executed the commands:
CFLAGS=-fsanitize=address
export CFLAGS
CPPFLAGS=-fsanitize=address
export CPPFLAGS
CXXFLAGS=-fsanitize=address
export CXXFLAGS
and printenv seems to confirm that I set the environment variables correctly:
comp@comp-NV55C:~$ printenv CFLAGS
-fsanitize=address
comp@comp-NV55C:~$ printenv CXXFLAGS
-fsanitize=address
comp@comp-NV55C:~$ printenv CPPFLAGS
-fsanitize=address
But when I run phoronix it never reports the compiler options being any different regardless of how the environment variables are set. I'm new to this sort of work and would greatly appreciate any advice on how to get this to work. Thank you.
Comment