<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - -Os generates crashy ARM iOS binary"
href="http://llvm.org/bugs/show_bug.cgi?id=19375">19375</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>-Os generates crashy ARM iOS binary
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.4
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>MacOS X
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>fischman@chromium.org
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=12357" name="attach_12357" title="tar cvjf of the pre-processed .c file and resulting .o's in question">attachment 12357</a> <a href="attachment.cgi?id=12357&action=edit" title="tar cvjf of the pre-processed .c file and resulting .o's in question">[details]</a></span>
tar cvjf of the pre-processed .c file and resulting .o's in question
At r189214 clang builds libvpx with -Os and the resulting binary doesn't crash.
At r191856 the resulting binary does crash. For lots of details/noise on the
crash please see <a href="https://code.google.com/p/webrtc/issues/detail?id=3038">https://code.google.com/p/webrtc/issues/detail?id=3038</a>
Since the crash is isolated to a single input .c file I've run that .c file
through clang -E under both clang versions (output differs only in immaterial
whitespace). I then ran each of these through its respective clang -c and got
significantly different object files (though, of course, this by itself is not
a problem). I'm attaching these files to this bug. The relevant -E and -c
command-lines are pasted below.
FWIW this crash only manifests on iOS -Os builds; -O0 builds are fine, and
Android armv7 -Os builds are fine too.
../../third_party/llvm-build/Release+Asserts/bin/clang -MMD -MF
obj/third_party/libvpx/source/libvpx/vp8/encoder/libvpx.pickinter.o.d
-DV8_DEPRECATION_WARNINGS -DBLINK_SCALE_FILTERS_AT_RECORD_TIME -DDISABLE_NACL
-DCHROMIUM_BUILD -DUSE_LIBJPEG_TURBO=1 -DENABLE_CONFIGURATION_POLICY
-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY
-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE -DENABLE_EGLIMAGE=1 -DCLD_VERSION=1
-DENABLE_SPELLCHECK=1 -DDISABLE_FTP_SUPPORT=1 -DNDEBUG -DNVALGRIND
-DDYNAMIC_ANNOTATIONS_ENABLED=0 -DNS_BLOCK_ASSERTIONS=1
-I../../third_party/libvpx/source/config/linux/arm-neon
-I../../third_party/libvpx/source/config
-I../../third_party/libvpx/source/libvpx -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk
-Os -gdwarf-2 -fvisibility=hidden -Wnewline-eof -miphoneos-version-min=6.0
-arch armv7 -Wendif-labels -Wno-unused-parameter
-Wno-missing-field-initializers -Wheader-hygiene -Wno-c++11-narrowing
-Wno-char-subscripts -Wno-unneeded-internal-declaration
-Wno-covered-switch-default -Wstring-conversion -Wno-deprecated-register
-Wno-absolute-value -std=c99 -Xclang -load -Xclang
/Users/fischman/src/wr/trunk/tools/clang/scripts/../../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib
-Xclang -add-plugin -Xclang find-bad-constructs -fcolor-diagnostics
-I/Users/fischman/src/wr/trunk/third_party/libvpx/source/config/linux/arm-neon
-I/Users/fischman/src/wr/trunk/third_party/libvpx/source/config
-Igen/third_party/libvpx -Wno-unknown-warning-option -E
../../third_party/libvpx/source/libvpx/vp8/encoder/pickinter.c -o
/tmp/b3038/libvpx.pickinter.E.189214
../../third_party/llvm-build/Release+Asserts/bin/clang -MMD -MF
obj/third_party/libvpx/source/libvpx/vp8/encoder/libvpx.pickinter.o.d
-DV8_DEPRECATION_WARNINGS -DBLINK_SCALE_FILTERS_AT_RECORD_TIME -DDISABLE_NACL
-DCHROMIUM_BUILD -DUSE_LIBJPEG_TURBO=1 -DENABLE_CONFIGURATION_POLICY
-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY
-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE -DENABLE_EGLIMAGE=1 -DCLD_VERSION=1
-DENABLE_SPELLCHECK=1 -DDISABLE_FTP_SUPPORT=1 -DNDEBUG -DNVALGRIND
-DDYNAMIC_ANNOTATIONS_ENABLED=0 -DNS_BLOCK_ASSERTIONS=1
-I../../third_party/libvpx/source/config/linux/arm-neon
-I../../third_party/libvpx/source/config
-I../../third_party/libvpx/source/libvpx -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk
-Os -gdwarf-2 -fvisibility=hidden -Wnewline-eof -miphoneos-version-min=6.0
-arch armv7 -Wendif-labels -Wno-unused-parameter
-Wno-missing-field-initializers -Wheader-hygiene -Wno-c++11-narrowing
-Wno-char-subscripts -Wno-unneeded-internal-declaration
-Wno-covered-switch-default -Wstring-conversion -Wno-deprecated-register
-Wno-absolute-value -std=c99 -Xclang -load -Xclang
/Users/fischman/src/wr/trunk/tools/clang/scripts/../../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib
-Xclang -add-plugin -Xclang find-bad-constructs -fcolor-diagnostics
-I/Users/fischman/src/wr/trunk/third_party/libvpx/source/config/linux/arm-neon
-I/Users/fischman/src/wr/trunk/third_party/libvpx/source/config
-Igen/third_party/libvpx -Wno-unknown-warning-option -x c -c
/tmp/b3038/libvpx.pickinter.E.189214 -o /tmp/b3038/libvpx.pickinter.o.189214</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>