Hi,

On Sat, Dec 17, 2016 at 12:27 AM, Dominique Pellé
<[email protected]> wrote:
> Yegappan Lakshmanan wrote:
>
>> Hi,
>>
>> On Fri, Dec 16, 2016 at 8:31 AM, Dominique Pellé
>> <[email protected]> wrote:
>>> Mike Williams wrote:
>>>
>>>> Tests pass but I don't have clang to check the UB warning so please test 
>>>> for
>>>> that.
>>>
>>> Not sure which compiler you use, but gcc also has ubsan, if you use a 
>>> version
>>> recent enough. I don't remember in which gcc version ubsan was introduced,
>>> probably gcc-4.8 or newer.
>>>
>>> To use it, uncomment this line in vim/src/Makefile and rebuild:
>>>
>>> #SANITIZER_CFLAGS = -g -O0 -fsanitize=undefined -fno-omit-frame-pointer
>>>
>>
>> This doesn't work on MacOS with Xcode 8.2. The following flags work:
>>
>> SANITIZER_CFLAGS = -g -O0 -fsanitize=address,undefined 
>> -fno-omit-frame-pointer
>
> Strange. I'd expect this to turn on both:
> - asan (address sanitizer)
> - and ubsan (undefined behavior sanitizer)
>

Yes. It turns on both the sanitizers. But I am not able to enable only
ubsan in the latest xcode 8.2 version. When I enable only ubsan,
I get the following linker error:

ld: file not found:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.0.0/lib/darwin/libclang_rt.ubsan_osx_dynamic.dylib

- Yegappan

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui