commit | a05e736d288a7f2009ee9d057e78713d9adeeb5f | [log] [tgz] |
---|---|---|
author | Vitaly Buka <vitalybuka@google.com> | Fri Nov 17 15:13:11 2023 -0800 |
committer | GitHub <noreply@github.com> | Fri Nov 17 15:13:11 2023 -0800 |
tree | c14591bbee646878d7fac2c4eacdfbc4d3395784 | |
parent | 506c47df00bbd9e527ecc5ac6e192b5fe5daa2c5 [diff] |
[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
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.