[PATCH] D63831: [scudo][standalone] Introduce the C & C++ wrappers [fixed]

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 1 16:53:05 PDT 2019


On Mon, Jul 1, 2019 at 2:33 PM Kostya Kortchinsky <kostyak at google.com>
wrote:

> Sorry for the late reply, I missed that mail.
> Are you using any special build option that could help narrow down what's
> going on?
> atomic_helpers.h has been there for quite some time with associated tests,
> so it's weird that it's only surfacing now.
> The code is only using the compiler's builtins as does sanitizer_common
> which isn't using latomic either except for old Android.
>

Hi Kostya,

Not sure what is going on, must be something different about my
environment, since I am the only one indicating an issue. Here's how I
configure llvm:

cmake -G Ninja -DCMAKE_C_COMPILER=/usr/bin/clang-4.0
-DCMAKE_CXX_COMPILER=/usr/bin/clang++-4.0  -DLLVM_ENABLE_WERROR=OFF
-DLLVM_ENABLE_TERMINFO=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-DCMAKE_INSTALL_PREFIX=${installpath}_build/install
-DCMAKE_BUILD_TYPE=Debug ${llvmpath}

Where the build compiler is a stock clang 4.0 release installed on my
machine.

Where is the atomic symbol supposed to be resolved from?

Thanks,
Teresa

>
> On Fri, Jun 28, 2019 at 11:50 AM Teresa Johnson via Phabricator <
> reviews at reviews.llvm.org> wrote:
>
>> tejohnson added a comment.
>>
>> I am getting failures when trying to link these tests, due to missing
>> symbols, e.g.:
>>
>> cd projects/compiler-rt/lib/scudo/standalone/tests && ./bin/clang
>> ScudoUnitTestsObjects.wrappers_c_test.cc.i386.o
>> ScudoUnitTestsObjects.scudo_unit_test_main.cc.i386.o
>> ScudoUnitTestsObjects.gtest-all.cc.i386.o lib/libRTScudoCUnitTest.i386.a -o
>> projects/compiler-rt/lib/scudo/standalone/tests/./ScudoCUnitTest-i386-Test
>> -Wl,-allow-shlib-undefined -lstdc++ -pthread -m32
>>
>> lib/libRTScudoCUnitTest.i386.a(wrappers_c.cc.o): In function
>> `scudo::atomic_u64::Type
>> scudo::atomic_load<scudo::atomic_u64>(scudo::atomic_u64 const volatile*,
>> scudo::memory_order)':
>> projects/compiler-rt/lib/scudo/standalone/atomic_helpers.h:66: undefined
>> reference to `__atomic_load_8'
>> ...
>>
>> and other missing symbols.
>>
>> It passes if I link manually and add in -latomic. Should that be added to
>> the link flags somewhere? How does this work on the bots or elsewhere?
>>
>>
>> Repository:
>>   rL LLVM
>>
>> CHANGES SINCE LAST ACTION
>>   https://reviews.llvm.org/D63831/new/
>>
>> https://reviews.llvm.org/D63831
>>
>>
>>
>>

-- 
Teresa Johnson |  Software Engineer |  tejohnson at google.com |
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190701/d412dc8a/attachment.html>


More information about the llvm-commits mailing list