diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2014-10-22 00:12:40 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2014-10-22 00:12:40 +0000 |
commit | 489316f1b789dfdbce1efe9fcbac44afb9e4b98a (patch) | |
tree | 5a15c38a7756be958a38b73c3f638fd5174c2a1b /lib/msan/msan.h | |
parent | 3c536954a67a883630f4a7513a27f02a892c3dcb (diff) |
[msan] Handle param-tls overflow.
ParamTLS (shadow for function arguments) is of limited size. This change
makes all arguments that do not fit unpoisoned, and avoids writing
past the end of a TLS buffer.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220351 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/msan/msan.h')
-rw-r--r-- | lib/msan/msan.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/msan/msan.h b/lib/msan/msan.h index 7bdb6a57c..ad66016b9 100644 --- a/lib/msan/msan.h +++ b/lib/msan/msan.h @@ -32,8 +32,9 @@ #define MEM_IS_SHADOW(mem) \ ((uptr)mem >= 0x200000000000ULL && (uptr)mem <= 0x400000000000ULL) -const int kMsanParamTlsSizeInWords = 100; -const int kMsanRetvalTlsSizeInWords = 100; +// These constants must be kept in sync with the ones in MemorySanitizer.cc. +const int kMsanParamTlsSize = 800; +const int kMsanRetvalTlsSize = 800; namespace __msan { extern int msan_inited; |