aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
diff options
context:
space:
mode:
authorJessica Clarke <jrtc27@jrtc27.com>2021-07-28 14:49:37 +0100
committerJessica Clarke <jrtc27@jrtc27.com>2021-07-28 16:03:41 +0100
commit40080e7e7f42857c8edac4a53e476a68563f1a98 (patch)
tree343fe7f0e339795935fff53528e9f81376e9f3cd /llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
parent0e79a94836d7127a87c36fdca43ffaf6a17d8964 (diff)
downloadllvm-40080e7e7f42857c8edac4a53e476a68563f1a98.zip
llvm-40080e7e7f42857c8edac4a53e476a68563f1a98.tar.gz
llvm-40080e7e7f42857c8edac4a53e476a68563f1a98.tar.bz2
[Clang interpreter] Avoid storing pointers at unaligned locations
The Clang interpreter's bytecode uses a packed stream of bytes representation, but also wants to have some opcodes take pointers as arguments, which are currently embedded in the bytecode directly. However, CHERI, and thus Arm's upcoming experimental Morello prototype, provide spatial memory safety for C/C++ by implementing language-level (and sub-language-level) pointers as capabilities, which track bounds, permissions and validity in hardware. This uses tagged memory with a single tag bit at every capability-aligned address, and so storing pointers to unaligned addresses results in the tag being stripped, leading to a tag fault when the pointer is ultimately dereferenced at a later point. In order to support a stricter C/C++ implementation like CHERI, we no longer store pointers directly in the bytecode, instead storing them in a table and embedding the index in the bytecode. Reviewed By: nand Differential Revision: https://reviews.llvm.org/D97606
Diffstat (limited to 'llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp')
0 files changed, 0 insertions, 0 deletions