[cfe-dev] Clang 3.3: --analyze produces object file full of XML (plist)

Jeffrey Walton noloader at gmail.com
Sun Sep 22 12:01:34 PDT 2013


Hi All,

I'm seeing some odd behavior with trying to build libevent under Clang
3.3. Its an auto tools project, but I have things narrowed down to a
clang invocation with and without the --analyze option.

I'm seeing the issue on Mac OS X 10.8.5 (x64) (fully patched) and
Ubuntu 12.10 (x64) (fully patched).

Any ideas on what might be wrong? The compiler never panics.

Jeff

*****
First, the expected case (without --analyze):

$ /usr/local/bin/clang -DHAVE_CONFIG_H -I. -I./compat -I./include
-I./include -g -O2 -Wall -fno-strict-aliasing
-Wno-deprecated-declarations -D_THREAD_SAFE -c event.c -fno-common
-DPIC -o .libs/event.o
In file included from event.c:60:
In file included from ./event-internal.h:38:
[removed 1 warning]

$ file ./.libs/event.o
./.libs/event.o: Mach-O 64-bit object x86_64

*****
Second, the unexpected case (with --analyze):

$ rm ./.libs/event.o
$ /usr/local/bin/clang --analyze -DHAVE_CONFIG_H -I. -I./compat
-I./include -I./include -g -O2 -Wall -fno-strict-aliasing
-Wno-deprecated-declarations -D_THREAD_SAFE -c event.c -fno-common
-DPIC -o .libs/event.o
[removed 2 warning]

$ file ./.libs/event.o
./.libs/event.o: XML  document text
$ cat ./.libs/event.o
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
 <key>clang_version</key>
<string>clang version 3.3 (tags/RELEASE_33/final)</string>
 <key>files</key>
 <array>
  <string>event.c</string>
 </array>
...



More information about the cfe-dev mailing list