Bug 6038 - Add support for GCC 4.8's -fsanitizer for Debug Configurations
Summary: Add support for GCC 4.8's -fsanitizer for Debug Configurations
Status: RESOLVED WONTFIX
Alias: None
Product: uClibc
Classification: Unclassified
Component: Other (show other bugs)
Version: 0.9.33.3
Hardware: PC Linux
: P5 enhancement
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-02 23:03 UTC by Jeffrey Walton
Modified: 2014-07-24 19:39 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeffrey Walton 2013-03-02 23:03:38 UTC
GCC 4.8 introduced two helpful features for debugging and diagnostics. First is a memory sanitizer, and second is a thread sanitizer. Memory saniter acts a lot like dmalloc or Valgrind and is invoked with -fsanitizer=memory. Thread sanitizer is a lot like Helgrind is invoked with -fsanitizer=thread.

There are numerous benefits to finding memory and threading problems early in the development process, and not letting the errors creep into production (libupnp is a perfect example).

References: http://gcc.gnu.org/gcc-4.8/changes.html, https://code.google.com/p/address-sanitizer/, https://code.google.com/p/data-race-test/wiki/ThreadSanitizer, and http://llvm.org/devmtg/2012-11/Serebryany_TSan-MSan.pdf.
Comment 1 Bernhard Reutner-Fischer 2014-07-24 19:39:32 UTC
I've tried that but currently the sanitizer people did not understand that it is a good idea to check on a per-feature base. Perhaps, if you can convince them to follow a sensible approach to support different targets *by means of probed features* we can come back and try to add support for using libsanitizer.

https://gcc.gnu.org/ml/gcc-patches/2014-04/msg01014.html
http://comments.gmane.org/gmane.comp.compilers.llvm.cvs/184974

(for your amusement).