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

Kostya Kortchinsky via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 2 08:11:49 PDT 2019


About Reid's issue, as stated on the Chromium bug, I assume it's the
-fsized-deallocation flag used in the tests, and a library that is missing
the sized delete operator.
I will see how I can reorganize the cmake to not have the flag for non-c++
tests.

Regarding Teresa's issue, I am trying a build with the same options (clang
version 4.0.1-10 (tags/RELEASE_401/final)), and it does repro so I'll see
if I can narrow down what's going on.

On Mon, Jul 1, 2019 at 4:53 PM Teresa Johnson <tejohnson at google.com> wrote:

>
>
> 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/20190702/e44a1045/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4845 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190702/e44a1045/attachment.bin>


More information about the llvm-commits mailing list