I am getting following error message while running my thread-sanitized executable. (I have used -fPIC
and -fsanitized=thread
flag at compilation , -fsanitize=thread -Wl
and '-pie' flag during executable time):
FATAL: ThreadSanitizer can not mmap the shadow memory (something is mapped at 0x2aab6c8a7000 < 0x7cf000000000)
FATAL: Make sure to compile with -fPIE and to link with -pie.
dmake: Error code 1, while making 'Shell escape'
However after going through this BugZilla link, I have checked /proc/sys/kernel/randomize_va_space
and enabled randomization with value 2. I have also specified where to load PIE via a linker switch -Ttext-segment 0x855555000000
.
Now I have no more FATAL error but I have encountered with new error message :
dmake: Error code 137, while making 'Shell escape'
I don't know where I am making mistake with flags. Any idea?