6 Commits

Author SHA1 Message Date
Vitaly Buka
9aa88b0f02 [test][msan] Remove redundant --check-prefixes 2023-11-17 17:21:10 -08:00
Vitaly Buka
66e9429e75
[msan][aarch64] Improve argument classification
Arm64 use multiple registers (varg slots) to pass arrays.

Reviewers: kstoimenov, thurstond

Reviewed By: thurstond

Pull Request: https://github.com/llvm/llvm-project/pull/72728
2023-11-17 17:01:34 -08:00
Vitaly Buka
faaea79ed5 [msan][test] Add ptr test case 2023-11-17 16:52:02 -08:00
Vitaly Buka
a05e736d28
[msan][x86] Fix shadow if vararg overflow beyond kParamTLSSize
Caller puts argument shadow one by one into __msan_va_arg_tls, until it
reaches kParamTLSSize. After that it still increment OverflowOffset but
does not store the shadow.

Callee needs OverflowOffset to prepare a shadow for the entire overflow
area. It's done by creating "varargs shadow copy" for complete list of
args, copying available shadow from __msan_va_arg_tls, and clearing the
rest.

However callee does not know if the tail of __msan_va_arg_tls was not
able to fit an argument, and callee will copy tail shadow into "varargs
shadow copy", and later used as a shadow for an omitted argument.

So that unused tail of the __msan_va_arg_tls must be cleared if left
unused.

This allows us to enable compiler-rt/test/msan/vararg_shadow.cpp for
x86.

Reviewers: kstoimenov, thurstond

Reviewed By: thurstond

Pull Request: https://github.com/llvm/llvm-project/pull/72707
2023-11-17 15:13:11 -08:00
Vitaly Buka
341ca1ad0c
[test][msan] s390x already passes the test
3bc439bdff8bb5518098bd9ef52c56ac071276bc implemented overflow copying in a different way.

It's lucky to pass this test, but may fails in a different way.

Reviewers: thurstond, iii-i

Reviewed By: thurstond

Pull Request: https://github.com/llvm/llvm-project/pull/72710
2023-11-17 14:26:41 -08:00
Vitaly Buka
37db332cf9
[test][msan] Precommit tests for vararg improvements (#72612) 2023-11-17 12:37:20 -08:00