[llvm-dev] [HWASAN] Is Buildbot missing hwasan tests?

50 views
Skip to first unread message

David Greene via llvm-dev

unread,
Jan 2, 2019, 1:42:18 PM1/2/19
to llvm...@lists.llvm.org
After updating from trunk today, I am seeing this failure in hwasan:

FAIL: HWAddressSanitizer-x86_64 :: TestCases/sizes.cpp (19011 of 49508)
******************** TEST 'HWAddressSanitizer-x86_64 :: TestCases/sizes.cpp' FAILED ********************
<snip>
Command Output (stderr):
--
+ : 'RUN: at line 1'
+ /build/./bin/clang --driver-mode=g++ -fsanitize=hwaddress -mllvm -hwasan-generate-tags-with-calls -m64 -gline-tables-only /compiler-rt/test/hwasan/TestCases/sizes.cpp -lstdc++ -o /build/projects/compiler-rt/test/hwasan/X86_64/TestCases/Output/sizes.cpp.tmp
/install/binutils/x86_64/bin/ld.gold: warning: Cannot export local symbol '__hwasan_thread_enter'
/install/binutils/x86_64/bin/ld.gold: warning: Cannot export local symbol '__hwasan_thread_exit'
/install/binutils/x86_64/bin/ld.gold: warning: Cannot export local symbol '__hwasan_tls'
/tmp/lit_tmp_GtMlYc/sizes-acae44.o:sizes.cpp:function main: error: undefined reference to '__hwasan_memset'
/tmp/lit_tmp_GtMlYc/sizes-acae44.o:sizes.cpp:function main: error: undefined reference to '__hwasan_memset'
clang-8: error: linker command failed with exit code 1 (use -v to see invocation)

I looked through the buildbots and I don't see anything that runs hwasan
tests.

As far as I can tell, the hwasan tests are only run as part of check-all
when compiler-rt is included in a top-level LLVM build or as part of
check-hwasan. No clang or llvm builder include compiler-rt AFAICT, so
check-all doesn't test it. I don't see check-hwasan in this builder, or
any of the other sanitizer builders I checked:

http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/18677

Is there a hole in our testing?

Anyone else seeing this failure? Any idea of the cause?
"hwasan_memset" doesn't appear anywhere in compiler-rt's history, but it
shows up in LLVM:

commit 631b5bc6125d979804e3e563935a93e2577e617c
Author: Eugene Leviant <elev...@accesssoftek.com>
Date: Thu Dec 20 09:04:33 2018 +0000

[HWASAN] Add support for memory intrinsics

Differential revision: https://reviews.llvm.org/D55117


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349728 91177308-0d34-0410-b5e6-96231b3b80d8

This commit turned on memory intrinsic instrumentation by default and is
the culprit, I'm guessing:

commit 73121b2cc825d26b849e5c6fa04c690a6a35fb6e
Author: Eugene Leviant <elev...@accesssoftek.com>
Date: Mon Dec 24 16:02:48 2018 +0000

[HWASAN] Instrument memorty intrinsics by default

Differential revision: https://reviews.llvm.org/D55926


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350055 91177308-0d34-0410-b5e6-96231b3b80d8

-David
_______________________________________________
LLVM Developers mailing list
llvm...@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

Chandler Carruth via llvm-dev

unread,
Jan 2, 2019, 4:39:08 PM1/2/19
to David Greene, Evgenii Stepanov, llvm...@lists.llvm.org

Evgenii Stepanov via llvm-dev

unread,
Jan 2, 2019, 4:53:36 PM1/2/19
to Chandler Carruth, David Greene, llvm...@lists.llvm.org
This commit has added __hwasan_memset to compiler-rt:

commit 749bd83b08b7239f5d18c4e3095183919c68eb30
Author: Eugene Leviant <elev...@accesssoftek.com>
Date: Thu Dec 20 09:10:03 2018 +0000

[HWASAN] Add support for memory intrinsics

This is patch complements D55117 implementing __hwasan_mem*
functions in runtime

Differential revision: https://reviews.llvm.org/D55554

Notes:
git-svn-rev: 349730

We run hwasan tests on
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-android in
the "run lit tests" step on aarch64 android.

It looks like you are right about the x86_64-linux bot, we should add
check-hwasan there as well. I'll look into it.

Evgenii Stepanov via llvm-dev

unread,
Jan 2, 2019, 7:28:22 PM1/2/19
to Chandler Carruth, David Greene, llvm...@lists.llvm.org
This bot now runs hwasan tests, successfully:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/18688

David Greene via llvm-dev

unread,
Jan 3, 2019, 3:57:29 PM1/3/19
to Evgenii Stepanov, llvm...@lists.llvm.org
Evgenii Stepanov <eug...@google.com> writes:

> This commit has added __hwasan_memset to compiler-rt:

Yes, user error on my part. For some reason, my regular update script
failed to update compiler_rt correctly.

> We run hwasan tests on
> http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-android in
> the "run lit tests" step on aarch64 android.

Ok. It looks like that builder also runs sanitizer tests for AArch64.
Am I reading that correctly? Are there any builders that run sanitizer
tests for AArch64 on Linux?

> It looks like you are right about the x86_64-linux bot, we should add
> check-hwasan there as well. I'll look into it.

Thanks!


-David

David Greene via llvm-dev

unread,
Jan 3, 2019, 3:59:44 PM1/3/19
to Evgenii Stepanov, llvm...@lists.llvm.org

Evgenii Stepanov via llvm-dev

unread,
Jan 3, 2019, 5:13:54 PM1/3/19
to David Greene, llvm...@lists.llvm.org
Ah, I spoke too soon - the buildbot run has not finished yet when I
looked at the link.
I'll fix it.
Reply all
Reply to author
Forward
0 new messages