Hi, all
I want to make a couple of small modiciation to clang source base so that it can fit into my project.
(1) I want to set '-fsanitize=integer' as default action, so that the option is turned on always.
(2) I want to change the format of the error message emitted upon detection and redirect it to a specific file (not stderr or stdout).
Could anyone tell me how can I do this or what source do I have to touch?
Thanks a lot for your help in advance!
Hi, all
I want to make a couple of small modiciation to clang source base so that it can fit into my project.
(1) I want to set ‘-fsanitize=integer’ as default action, so that the option is turned on always.
Maybe you could add this to your CFLAGS, or if you can’t do that, then make a wrapper for the clang binary which adds it?
(2) I want to change the format of the error message emitted upon detection and redirect it to a specific file (not stderr or stdout).
In “sanitizer/common_interface_defs.h”, you can find this:
extern “C” void __sanitizer_set_report_path(const char *path);
Call it before your program would emit any sanitizer diagnostics, and they should go to the filename you provide.