Closed maroneze closed 2 years ago
Hello,
thank you for your feedback. Regarding the clang tl;dr options you are right, I did mixup when copy pasting. I just fixed them in f630002.
Regarding the combination of the -fsanitize
flags, I'll try to check what's going on, so I'll let the bug open.
Don't hesitate to comment if you have more feedback.
Actually the documentation states that some sanitizers are not allowed together.
First of all, thank you very much for this useful list and explanations; it really helps extracting maximum power out of compilers and sanitizers.
I have a few questions about some options.
I have a Fedora 34 with Clang 12 installed, according to
clang -v
:I tried compiling a simple program using the options in the "Clang TL;DR" list, while also using the options for "AddressSanitizer + UndefinedBehaviorSanitizer", that is:
I got the following error message:
Indeed, there is a mention elsewhere in the page of option
-fno-sanitize-recover
, so it seems that-fsanitize-no-recover
might be a typo. Could you please confirm it? Or is it a different option?About
-fsanitize=bounds-strict
, I found references to it on Google but only for GCC, not for Clang/LLVM. But I couldn't find a definitive list of options concerning all sanitizers, so maybe my Clang is missing them? Could you please confirm, or offer more details about the version of Clang you are using where this option works?About the incompatibility between SafeStack and Leak, I couldn't find any mentions in their documentation, but they don't typically list all incompatibilities (which would be hard to do and keep up-to-date), so I wonder if I took a bit too literally the comment "Run debug/test builds with sanitizers (in addition to the flags above)", by combining all flags. Or is there a way to run them together? I'd appreciate if you could clarify it (or just confirm that, indeed, mixing both does not work).
Finally, after removing
-fsanitize=leak
, I still got an error:clang-12: error: invalid argument '-fsanitize=safe-stack' not allowed with '-fsanitize=address'
. So, I ended up removing-fsanitize=safe-stack
and putting back-fsanitize=leak
, and this time I had no more errors. Once again, I wonder if this is specific to my configuration.