Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 20 Jan 2013 12:18:45 +0100
From: Frank Dittrich <frank_dittrich@...mail.com>
To: john-dev@...ts.openwall.com
Subject: clang -faddress-sanitizer vs. -fsanitize=address (was: new clang
 3.2 warnings)

On 01/20/2013 11:00 AM, magnum wrote:
> On 20 Jan, 2013, at 10:55 , magnum <john.magnum@...hmail.com> wrote:
>> On 20 Jan, 2013, at 10:38 , Frank Dittrich <frank_dittrich@...mail.com> wrote:
>>> clang: warning: argument unused during compilation: '-faddress-sanitizer'
[...]
>>> But when I change the option name in Makefile, I get
>>> clang: warning: argument unused during compilation: '-fsanitize=address'
>>> instead, for 2.9 and for 3.1.
>>>
>>> This is bad. May be HAVE_CLANG_3_2 is a good enough solution right now?
>>> How widespread is clang 3.2? Fedora 18 still uses 3.1.
>>
>> Bull's clang is 3.0-6ubuntu3. It doesn't seem to understand either of the variants.
> 
> No, wait. The message "argument unused during compilation" just tells us that option should be in LDFLAGS only, not CFLAGS. So Bull's clang does support -fsanitize-address. I'll commit a patch.

According to http://clang.llvm.org/docs/AddressSanitizer.html, the
-fsanitize=address option has to be used for compilation and for
linking. May be clang 2.9 and 3.0 just don't support -faddress-sanitizer
correctly.
The renaming of -faddress-sanitizer to -fsanitize=address for clang
versions >= 3.2 seems to be a separate issue.

Frank

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.