This is an archive of the discontinued LLVM Phabricator instance.

[sanitizer][msan] The LLVM part of the LoongArch memory sanitizer implementation
ClosedPublic

Authored by Ami-zhang on Jun 12 2023, 3:00 AM.

Details

Summary

This patch enabled msan in LLVM and fixed all failing tests in
check-msan.

It does not add VarArgHelper implementation on LoongArch, which
will be done separately later. And it adds a test for VarArgNoOpHelper,
which is based on the X86 one.

Diff Detail

Event Timeline

Ami-zhang created this revision.Jun 12 2023, 3:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 12 2023, 3:00 AM
Ami-zhang requested review of this revision.Jun 12 2023, 3:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 12 2023, 3:00 AM

Tests on LoongArch in check-msan are as follows:
(1) Without this patch

$ ninja check-msan
Testing Time: 58.13s
  Unsupported      :   9
  Passed           :   1
  Expectedly Failed:   3
  Failed           : 153

(2) With this patch

$ ninja check-msan
Testing Time: 75.51s
  Unsupported      :   9
  Passed           : 154
  Expectedly Failed:   3

Test for vararg.ll on LoongArch:

$ _build_rt/bin/llvm-lit llvm/test/Instrumentation/MemorySanitizer/LoongArch/vararg.ll 
-- Testing: 1 tests, 1 workers --
PASS: LLVM :: Instrumentation/MemorySanitizer/LoongArch/vararg.ll (1 of 1)

Testing Time: 0.14s
  Passed: 1
vitalybuka accepted this revision.Jun 21 2023, 11:30 PM
This revision is now accepted and ready to land.Jun 21 2023, 11:30 PM