[cfe-users] How to enable Initialization Order Fiasco sanitizer from the command line?

2016-01-11 Thread Jeffrey Walton via cfe-users
Hi Everyone,

We have a C++ library and a test script that grinds though various
configurations. It include various sanitizers. The script is a
security gate, and the self tests must pass for a release.

I want to add the Initialization Order Fiasco sanitizer as a command
line option, and not a envar export. There are some reasons for it,
like a positive confirmation the option exists and explicit invocation
of the checker.

How do I enable Initialization Order Fiasco sanitizer from the command line?

Thanks in advance.
___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


Re: [cfe-users] How to enable Initialization Order Fiasco sanitizer from the command line?

2016-01-11 Thread Alexey Samsonov via cfe-users
To quote Reid's response from another group:

"""
If you want to bake in some options at compile time, there are a few ways
to do it. -DASAN_DEFAULT_OPTIONS=check_initialization_order=true will work,
or you can define the __asan_default_options function somewhere in the
binary like this:

extern "C" const char *__asan_default_options() { return
"check_initialization_order=true"; }
"""

On Mon, Jan 11, 2016 at 2:53 AM, Jeffrey Walton via cfe-users <
cfe-users@lists.llvm.org> wrote:

> Hi Everyone,
>
> We have a C++ library and a test script that grinds though various
> configurations. It include various sanitizers. The script is a
> security gate, and the self tests must pass for a release.
>
> I want to add the Initialization Order Fiasco sanitizer as a command
> line option, and not a envar export. There are some reasons for it,
> like a positive confirmation the option exists and explicit invocation
> of the checker.
>
> How do I enable Initialization Order Fiasco sanitizer from the command
> line?
>
> Thanks in advance.
> ___
> cfe-users mailing list
> cfe-users@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users
>



-- 
Alexey Samsonov
vonos...@gmail.com
___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


[cfe-users] segmentation fault 11 when running clang-tidy

2016-01-11 Thread Hongping Lim via cfe-users
I am on Mac OS X 10.11.1, and downloaded the sources and followed the
instructions to build clang-tidy. I used xcodebuild and xcpretty to
generate the compile_commands.json file. I have the json file in my project
root, and ran:

~/build/bin/clang-tidy ./MyFile.m

Initially I got this error "LLVM ERROR: unknown module format", and after
some Googling, tried to delete all the fmodule and gmodule parameters from
the json file.

After that, I keep getting "Segmentation fault: 11" most of the time. There
was once when I was able to get the list of warnings, but when I run the
same command right after, I get the segmentation fault again.

Thanks,
Hongping
___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


Re: [cfe-users] segmentation fault 11 when running clang-tidy

2016-01-11 Thread Hongping Lim via cfe-users
I tried running the command on some other files, and managed to get it
working once, and then it segfaulted again when I ran the same command
right after.

Suppressed 217 warnings (217 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
hongping@HLim-MBP:~/my/project$ ../build/bin/clang-tidy -checks=* ./MyFile.m
clang-tidy(3670,0x7fff71f9b000) malloc: *** error for object
0x7fcf2007: pointer being realloc'd was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6



On Mon, Jan 11, 2016 at 5:57 PM, Hongping Lim 
wrote:

> I am on Mac OS X 10.11.1, and downloaded the sources and followed the
> instructions to build clang-tidy. I used xcodebuild and xcpretty to
> generate the compile_commands.json file. I have the json file in my project
> root, and ran:
>
> ~/build/bin/clang-tidy ./MyFile.m
>
> Initially I got this error "LLVM ERROR: unknown module format", and after
> some Googling, tried to delete all the fmodule and gmodule parameters from
> the json file.
>
> After that, I keep getting "Segmentation fault: 11" most of the time.
> There was once when I was able to get the list of warnings, but when I run
> the same command right after, I get the segmentation fault again.
>
> Thanks,
> Hongping
>
___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users