Page MenuHomePhabricator

[msan] Add msan support for loongarch64
Needs RevisionPublic

Authored by tangyouling on Dec 21 2022, 11:20 PM.

Details

Reviewers
vitalybuka
SixWeining
xen0n
xry111
MaskRay
lixing-star
XiaodongLoong
Group Reviewers
Restricted Project
Summary

This patch enabled msan for loongarch64 with 47-bit VMA layout.

Diff Detail

Event Timeline

tangyouling created this revision.Dec 21 2022, 11:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 21 2022, 11:20 PM
tangyouling requested review of this revision.Dec 21 2022, 11:20 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptDec 21 2022, 11:20 PM
ERROR   git-clang-format returned an non-zero exit code 1

Please format the code. Maybe, you can use the following command:

git diff -U0 --no-color HEAD^ | clang/tools/clang-format/clang-format-diff.py -i -p1

Add code format check.

SixWeining added inline comments.Dec 26 2022, 6:16 PM
compiler-rt/lib/msan/msan.h
192

We fall to this? But not line 208?

compiler-rt/test/msan/mmap.cpp
22–24

These addresses are the same as x86_64 above. Is this expected?

tangyouling added inline comments.Dec 26 2022, 6:50 PM
compiler-rt/lib/msan/msan.h
192

I will move the contents of line 208 to line 91.

compiler-rt/test/msan/mmap.cpp
22–24

Because the app-{1,2,3} definition of kMemoryLayout is consistent with x86_64, it is the same here.

Modify the kMemoryLayout definition position of loongarch64.

Seems that missing atest in llvm/test/Instrumentation/MemorySanitizer/.

vitalybuka added inline comments.Jan 12 2023, 2:30 PM
llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
5879

it looks like exact copy of VarArgMIPS64Helper
why not "new VarArgMIPS64Helper"?

Seems that missing atest in llvm/test/Instrumentation/MemorySanitizer/.

Yes, need to add corresponding test for vararg.

vitalybuka requested changes to this revision.Jan 18 2023, 12:14 AM

I assume work in progress

This revision now requires changes to proceed.Jan 18 2023, 12:14 AM