[cfe-dev] clang/llvm issue with compiling gcc

John Smith lbalbalba at gmail.com
Thu Sep 15 09:27:49 PDT 2011


Hi,


Ok, so I ran scan-build with -v -v options, and got a whole lot of
output. I ran 'scan-build -v -v -o /tmp/gcc make' so i didnt specify a
parallel build. According to the screen output, it seems to freeze
while analyzing 'ANALYZE: ../.././gcc/c-common.c c_define_builtins'.

I can reproduce the hang by running the exact same command line myself :

/usr/local/bin/clang -cc1 -triple i386-pc-linux-gnu -analyze
-disable-free -main-file-name c-common.c -analyzer-store=region
-analyzer-opt-analyze-nested-blocks -analyzer-eagerly-assume
-analyzer-checker=core -analyzer-checker=deadcode
-analyzer-checker=security -analyzer-checker=unix -analyzer-output
plist -w -mrelocation-model static -mdisable-fp-elim -masm-verbose
-mconstructor-aliases -target-cpu pentium4 -target-linker-version
2.20.51.0.7 -momit-leaf-frame-pointer -resource-dir
/usr/local/bin/../lib/clang/3.0 -D IN_GCC -D HAVE_CONFIG_H -I . -I .
-I ../.././gcc -I ../.././gcc/. -I ../.././gcc/../include -I
../.././gcc/../libcpp/include -I ../.././gcc/../libdecnumber -I
../.././gcc/../libdecnumber/bid -I ../libdecnumber -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings -ferror-limit 19
-fmessage-length 0 -fdiagnostics-show-option
-analyzer-display-progress -analyzer-output=html -o
/tmp/gcc/2011-09-15-1 -x c ../.././gcc/c-common.c

Now where do I find this 'pre-processed' file I need to submit the bug report ?


Regards,


John Smith.




On Tue, Sep 13, 2011 at 9:33 PM, Ted Kremenek <kremenek at apple.com> wrote:
> Hi John,
>
> It sounds like the analyzer is hanging on one of your files.
>
> Could suggestions for debugging:
>
> 1) Don't perform a parallel build.
>
> 2) Run scan-build with two extra -v -v options, which will show a very verbose log of information, including how clang is getting invoked for static analysis.
>
> Once you find the file that it is hanging on, please file a bug report with a preprocessed file that can be used to reproduce the issue.
>
> Cheers,
> Ted
>
> On Sep 13, 2011, at 12:25 PM, John Smith wrote:
>
>> Hi,
>>
>>
>> Im trying to run scan-build on GCC 4.5.3, and im running into the
>> following problem: Somewhere during the compilation, the process seems
>> to stall/freeze/hang/loop... whatever it's doing, it's not progressing
>> anymore.
>>
>> Im running into this issue using clang version 3.0 trunk 139148. I
>> didnt run into this problem when compiling the same version of gcc on
>> the same system when using either gcc (4.5.1), or an earlier version
>> of clang: v3.0 trunk rev. 131083 (or slightly earlier, dont have the
>> exact version). I didnt run into this issue when I ran with the same
>> version of scan-build on other c programs (yet ?) on the same system.
>> It doesnt seem to be a disk/cpu/ram shortage issue.
>>
>> According to 'top', 'clang' is eating up most of my cpu, but when
>> running strace on the pid, I get no output whatsoever. When running
>> strace on the 7 PID's running 'ccc-analyzer', most seem to be in
>> either 'wait' or 'waitpid'. Except for the ccc-analyzer that produced
>> the last output on my screen, wich seems to be stuck in 'read'. The 2
>> PID's of 'make' seem to be in wait and waitpid as well.
>>
>> I have no idea on how to start with problemshooting here. Any help is welcome.
>>
>>
>> Thanks in advance,
>>
>>
>> Regards,
>>
>>
>> John Smith.
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>



More information about the cfe-dev mailing list