google / sanitizers

AddressSanitizer, ThreadSanitizer, MemorySanitizer
Other
11.01k stars 998 forks source link

TSAN_OPTIONS="log_path=/var/log/xxxx_tsan" doesn't work, the logs still print on stdout #1728

Open Syllinia opened 4 months ago

Syllinia commented 4 months ago

I tried two methods and both failed. 1.TSAN_OPTIONS="log_path=/var/log/xxxx_tsan" and then execute my program.

2.At the very beginning in the main of the program, setenv("TSAN_OPTIONS", "log_path=/data/var/log/gui_upload/proxyd_tsan", 1);

The compiler is clang version 14.0.6

Any constructive comments are highly welcome.