This is an archive of the discontinued LLVM Phabricator instance.

light up ASan on ARM. XFAILed failing tests
ClosedPublic

Authored by garious on May 20 2014, 5:46 PM.

Details

Summary

Marked currently failing tests with XFAIL. Tests that hang are marked Unsupported.

To try, configure your standalone compiler-rt build with the following CMake variables:

CMAKE_C_COMPILER=arm-linux-gnueabi-gcc
COMPILER_RT_TEST_COMPILER=clang
COMPILER_RT_TEST_TARGET_TRIPLE=arm-linux-gnueabi
COMPILER_RT_TEST_COMPILER_CFLAGS='-target arm-linux-gnueabi --sysroot=$ARM_SYSROOT -B$GCC_DIR'
COMPILER_RT_EMULATOR=qemu-arm-wrapper.sh

Diff Detail

Repository
rL LLVM

Event Timeline

garious updated this revision to Diff 9649.May 20 2014, 5:46 PM
garious retitled this revision from to light up ASan on ARM. XFAILed failing tests.
garious updated this object.
garious edited the test plan for this revision. (Show Details)
garious added reviewers: samsonov, kcc, eugenis, rengolin.
garious added a subscriber: Unknown Object (MLST).
kcc edited edge metadata.May 21 2014, 6:54 AM

What's the plan for removing these XFAILS?
Also, Android is also ARM, and I thought we already run these lit tests there.
eugenis?

eugenis edited edge metadata.May 21 2014, 8:10 AM

We don't run these tests on Android as I did not have time to finish deployment.

I suspect at least part of these failures are specific to arm-linux, and not arm in general?

Some are just ARM Linux (fast unwind not working as expected and giving us bad stack traces). Some are triggering segfaults when looking up shadow memory. Some hang and might indicate qemu-arm bugs - those are marked "REQUIRES: stable-runtime" in this patch.

I can't commit to fixing all the XFAILs before the 3.5 release. Would anyone be able to lend a hand? I think the first step would be to set up a qemu-arm bot so that we can standardize on a runtime environment and configuration. For instance, to get ASan to start up, I had to configure qemu to reserve zero bytes for guest virtual address space (-R 0) and I don't understand why that is needed.

As for Android, I hear the Android emulator is based on qemu. Maybe this bot can build and test both arm-linux and android?

Some are just ARM Linux (fast unwind not working as expected and giving us bad stack traces).

These should be fixable by adding -fno-omit-frame-pointer to tests' CXXFLAGS or fast_unwind_on_malloc=0 to ASAN_OPTIONS. Problems may also be caused by broken unwind tables in ARM backend.

garious updated this revision to Diff 9854.May 27 2014, 5:24 PM
garious updated this object.
garious edited edge metadata.
garious closed this revision.May 29 2014, 4:42 PM
garious updated this revision to Diff 9939.

Closed by commit rL209862 (authored by @garious).