<html>
<head>
<base href="https://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 --- - undefined reference to '__ubsan_handle_mul_overflow'"
href="https://llvm.org/bugs/show_bug.cgi?id=24932">24932</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>undefined reference to '__ubsan_handle_mul_overflow'
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</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>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>llvm.zheng@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Encountered this error when building AOSP with LLVM.
FAILED: /bin/bash -c "(true) && (mkdir -p
out/target/product/flounder/obj_arm/SHARED_LIBRARIES/libcutils_intermediates/LINKED/)
&& (/homes/foo/2015-09-23/bin/clang++ -nostdlib -Wl,-soname,libcutils.so
-Wl,--gc-sections -shared -Lout/target/product/flounder/obj_arm/lib
out/target/product/flounder/obj_arm/lib/crtbegin_so.o
-Wl,--whole-archive
out/target/product/flounder/obj_arm/STATIC_LIBRARIES/libcutils_intermediates/libcutils.a
out/target/product/flounder/obj_arm/STATIC_LIBRARIES/liblog_intermediates/liblog.a
-Wl,--no-whole-archive
out/target/product/flounder/obj_arm/STATIC_LIBRARIES/libunwind_llvm_intermediates/libunwind_llvm.a
out/target/product/flounder/obj_arm/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/libcompiler_rt-extras.a
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/../lib/gcc/arm-linux-androideabi/4.9.x-google/../../../../arm-linux-androideabi/lib/libatomic.a
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/../lib/gcc/arm-linux-androideabi/4.9.x-google/libgcc.a
-llog -lc++ -ldl -ldl -lc -lm -o
out/target/product/flounder/obj_arm/SHARED_LIBRARIES/libcutils_intermediates/LINKED/libcutils.so
-Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--build-id=md5
-Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--icf=safe
-Wl,--hash-style=gnu -Wl,--no-fix-cortex-a8 -target arm-linux-androideabi
-Bprebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/bin
-Wl,--exclude-libs,libunwind_llvm.a -Wl,--no-undefined
out/target/product/flounder/obj_arm/lib/crtend_so.o)"
system/core/libcutils/hashmap.c:54: error: undefined reference to
'__ubsan_handle_mul_overflow'
system/core/libcutils/hashmap.c:145: error: undefined reference to
'__ubsan_handle_add_overflow'
system/core/libcutils/hashmap.c:101: error: undefined reference to
'__ubsan_handle_sub_overflow'
system/core/libcutils/hashmap.c:211: error: undefined reference to
'__ubsan_handle_add_overflow'
system/core/libcutils/hashmap.c:117: error: undefined reference to
'__ubsan_handle_add_overflow'
system/core/libcutils/hashmap.c:101: error: undefined reference to
'__ubsan_handle_sub_overflow'
system/core/libcutils/hashmap.c:106: error: undefined reference to
'__ubsan_handle_mul_overflow'
system/core/libcutils/hashmap.c:101: error: undefined reference to
'__ubsan_handle_sub_overflow'
system/core/libcutils/hashmap.c:101: error: undefined reference to
'__ubsan_handle_sub_overflow'
system/core/libcutils/hashmap.c:276: error: undefined reference to
'__ubsan_handle_add_overflow'
system/core/libcutils/hashmap.c:331: error: undefined reference to
'__ubsan_handle_mul_overflow'
system/core/libcutils/native_handle.c:31: error: undefined reference to
'__ubsan_handle_mul_overflow'
clang-3.8: error: linker command failed with exit code 1 (use -v to see
invocation)
ninja: build stopped: subcommand failed.
make: *** [ninja.intermediate] Error 1
My clang version:
clang version 3.8.0 (<a href="http://llvm.org/git/clang.git">http://llvm.org/git/clang.git</a>
9dcbcab85ccca71ccdfa924b6946a0475d93b636) (<a href="http://llvm.org/git/llvm.git">http://llvm.org/git/llvm.git</a>
c173ab2ec2f9f99f5c8abf934b13a71e72c6806b)
Target: arm--linux-gnueabi
Thread model: posix</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>