Page MenuHomePhabricator

Enable ASAN on NetBSD
ClosedPublic

Authored by krytarowski on Aug 8 2017, 2:43 PM.

Details

Summary

This enables also static runtime option.

Sponsored by <The NetBSD Foundation>

Diff Detail

Repository
rL LLVM

Event Timeline

krytarowski created this revision.Aug 8 2017, 2:43 PM

check-asan

Failing Tests (2):
    AddressSanitizer-Unit :: ./Asan-x86_64-inline-Test/AddressSanitizerInterface.ManyThreadsWithStatsStressTest
    AddressSanitizer-Unit :: ./Asan-x86_64-with-calls-Test/AddressSanitizerInterface.ManyThreadsWithStatsStressTest

  Expected Passes    : 436
  Unsupported Tests  : 814
  Unexpected Failures: 2

check-asan-dynamic

Failing Tests (2):
    AddressSanitizer-Unit :: ./Asan-x86_64-inline-Dynamic-Test/AddressSanitizerInterface.ManyThreadsWithStatsStressTest
    AddressSanitizer-Unit :: ./Asan-x86_64-with-calls-Dynamic-Test/AddressSanitizerInterface.ManyThreadsWithStatsStressTest

  Expected Passes    : 372
  Unsupported Tests  : 814
  Unexpected Failures: 2

I will focus on these failures later.

vitalybuka added inline comments.Aug 10 2017, 11:32 AM
cmake/config-ix.cmake
487

No sure what does this mean: COMPILER_RT_ASAN_HAS_STATIC_RUNTIME and no COMPILER_RT_HAS_ASAN

krytarowski added inline comments.Aug 10 2017, 11:39 AM
cmake/config-ix.cmake
487

This enables COMPILER_RT_HAS_ASAN and COMPILER_RT_ASAN_HAS_STATIC_RUNTIME on NetBSD.

vitalybuka added inline comments.Aug 10 2017, 11:41 AM
cmake/config-ix.cmake
487

But there is NOT OS_NAME MATCHES "NetBSD"

krytarowski added inline comments.Aug 10 2017, 11:43 AM
cmake/config-ix.cmake
487

This is correct.

vitalybuka added inline comments.Aug 10 2017, 11:47 AM
cmake/config-ix.cmake
487

So I read this as NetBSD will always have COMPILER_RT_HAS_ASAN equal FALSE.
How does this enable COMPILER_RT_HAS_ASAN?

krytarowski added inline comments.Aug 10 2017, 11:49 AM
cmake/config-ix.cmake
487

This patch removes this line, not adds it. With removal of this condition (NOT NETBSD), it enables COMPILER_RT_HAS_ASAN.

vitalybuka accepted this revision.Aug 10 2017, 12:00 PM
vitalybuka added inline comments.
cmake/config-ix.cmake
487

facepalm
thanks

This revision is now accepted and ready to land.Aug 10 2017, 12:00 PM
krytarowski closed this revision.Aug 10 2017, 12:09 PM