GCC and "-fsanitize=memory" ?
Gordon McConnell
gordon.mcconnell@synopsys.com
Thu Mar 28 14:19:00 GMT 2019
Hi all,
I've previously used Purify / Valgrind for catching various code defects ; I would love to instead just use one or more of the sanitizers which are available from GCC. Address Sanitizer does a great job for detecting many of the defect types, but it's not catching 'UMR' (Uninitialized Memory Reads)
I notice that clang has a separate "-fsanitize=memory" option, which does catch these UMR defects, but GCC (even up to the latest 8.3 version) does not support this - it just reports : unrecognized command line option '-fsanitize=memory'
Is this functionality perhaps provided in GCC but available via some other flag / option, or is it definitely not implemented for GCC ? If the latter, is there a plan to make it available anytime soon ?
Thanks in advance for any info you can share on this.
Regards,
Gordon
More information about the Gcc-help
mailing list