When passing -fsanitize=address, clang internally defines _FORTIFY_SOURCE=0. This conflicts with the _FORTIFY_SOURCE=2 we like to set beforehand, so we don't enable -fsanitize=address at all. Perhaps we should try to use fsanitize-address, if it fails try again with _FORTIFY_SOURCE remoeved, and only then resolve that it isn't available.
I am calling this 0.2.7 territory for now, but if the fix turns out to be easy we could conceivably backport it.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
Ok, my idea above was not a good one. We should prefer FORTIFY_SOURCE over AddressSanitizer. Will have to use gcc I guess unless there's a great idea for this somewhere
I'm starting to re-evaluate my opinion if we shouldn't just get rid of FORTIFY_SOURCE=2 if it breaks -fsanitize=address. I've recently patched my configure script to allow just that very frequently to track down a bunch of bugs. In production builds which don't use expensive hardening we still have the FORTIFY_SOURCE
ug, apparently clang 3.7 broke everybody by messing up autotools builds, so that clang only builds its sanitizers correctly with cmake. So first I had to fix that on my desktop.
Then I managed to figure out that the only compilation problems were related to strcmp() and to some parenthesis in test_util.
And then I realized that it's going to complain a lot about leaks in the tests unless I say ASAN_OPTIONS=detect_leaks=0 .
And I found a couple of actual bugs with the tests, so I'm going to open tickets for those. But for now, the branch bug14821 could be what we need here. The part of this not applying to test_util.c could be an 0.2.7 backport but I'm a bit nervous.