Page MenuHomePhabricator

[RISCV][ASAN] mark asan as supported for RISCV64 and enable tests
ClosedPublic

Authored by EccoTheDolphin on Sep 12 2020, 6:21 PM.

Details

Summary

[11/11] patch series to port ASAN for riscv64

These changes allow using ASAN on RISCV64 architecture.
The majority of existing tests are passing. With few exceptions (see below).
Tests we run on qemu and on "HiFive Unleashed" board.

Tests run:

Asan-riscv64-inline-Test  - pass
Asan-riscv64-inline-Noinst-Test  - pass
Asan-riscv64-calls-Noinst-Test  - pass
Asan-riscv64-calls-Test  - pass

Lit tests:

RISCV64LinuxConfig (282 supported, few failures)
RISCV64LinuxDynamicConfig (289 supported, few failures)

Lit failures:

TestCases/malloc_context_size.cpp - asan works, but backtrace misses some calls
TestCases/Linux/malloc_delete_mismatch.cpp - asan works, but backtrace misses some calls
TestCases/Linux/static_tls.cpp - "Can't guess glibc version" (under debugging)
TestCases/asan_and_llvm_coverage_test.cpp - missing libclang_rt.profile-riscv64.a

These failures are under debugging currently and shall be addressed in a
subsequent commits.

Depends On D87581

Diff Detail

Event Timeline

EccoTheDolphin created this revision.Sep 12 2020, 6:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 12 2020, 6:21 PM
Herald added subscribers: Restricted Project, evandro, luismarques and 14 others. · View Herald Transcript
EccoTheDolphin requested review of this revision.Sep 12 2020, 6:21 PM
EccoTheDolphin edited the summary of this revision. (Show Details)Sep 12 2020, 6:47 PM
EccoTheDolphin added a reviewer: kcc.
luismarques added inline comments.Sep 14 2020, 5:07 AM
compiler-rt/lib/asan/tests/asan_test.cpp
626

I don't think we need the check for XLEN here. The condition result should be the same for RV32, and this doesn't need to wait for sanitizer support for riscv32.

651

ditto.

eugenis accepted this revision.Sep 16 2020, 1:48 PM
eugenis added a subscriber: eugenis.

LGTM

This revision is now accepted and ready to land.Sep 16 2020, 1:48 PM
zzheng added a subscriber: zzheng.Sep 17 2020, 2:31 PM

I don't mean to be nit-picking... but aren't all these [ASAN] patches only applies to RV-64? maybe mention in commit msg that RV-32 is not supported?

I don't mean to be nit-picking... but aren't all these [ASAN] patches only applies to RV-64? maybe mention in commit msg that RV-32 is not supported?

Will do. Thanks for your feedback.

addressed review comments

EccoTheDolphin retitled this revision from [RISCV][ASAN] mark asan as supported for RISCV and enable tests to [RISCV][ASAN] mark asan as supported for RISCV64 and enable tests.Sep 20 2020, 11:47 PM
EccoTheDolphin edited the summary of this revision. (Show Details)
EccoTheDolphin marked 2 inline comments as done.
vitalybuka accepted this revision.Sep 22 2020, 6:02 PM
EccoTheDolphin edited the summary of this revision. (Show Details)Sun, Sep 27, 3:39 PM
This revision was landed with ongoing or failed builds.Mon, Oct 5, 12:38 AM
This revision was automatically updated to reflect the committed changes.