Commit Graph

6 Commits

Author SHA1 Message Date
Vitaly Buka c2a3fb303f [msan] Don't track origns in signal handlers
Origin::CreateHeapOrigin is not async-signal-safe and can deadlock.

Differential Revision: https://reviews.llvm.org/D107431
2021-08-05 13:53:20 -07:00
Jianzhou Zhao c0dc885d29 [msan] Use non-transparent-huge-page at SetShadow
This prevents from getting THP ranges more and more.

Did not see any issues in practice, just found this by code review.

Reviewed By: eugenis, vitalybuka

Differential Revision: https://reviews.llvm.org/D97593
2021-02-27 00:28:57 +00:00
Jianzhou Zhao f86db34def [MSan] Move origins for overlapped memory transfer
Reviewed-by: eugenis

Differential Revision: https://reviews.llvm.org/D94572
2021-01-21 02:11:26 +00:00
Jianzhou Zhao 0b99385e15 [MSan] Partially revert some changes from D94552
Because of line 55, actually aligned_beg always equals to beg.
2021-01-13 07:03:17 +00:00
Jianzhou Zhao 82655c1514 [MSan] Tweak CopyOrigin
There could be some mis-alignments when copying origins not aligned.

I believe inaligned memcpy is rare so the cases do not matter too much
in practice.

1) About the change at line 50

Let dst be (void*)5,
then d=5, beg=4
so we need to write 3 (4+4-5) bytes from 5 to 7.

2) About the change around line 77.

Let dst be (void*)5,
because of lines 50-55, the bytes from 5-7 were already writen.
So the aligned copy is from 8.

Reviewed-by: eugenis
Differential Revision: https://reviews.llvm.org/D94552
2021-01-13 01:22:05 +00:00
Nico Weber 60c66db476 compiler-rt: Rename .cc file in lib/msan to .cpp
Like r367463, but for msan.

llvm-svn: 367562
2019-08-01 14:08:18 +00:00