about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorCelina G. Val <celinval@amazon.com>2024-01-17 18:35:19 -0800
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-01-19 10:00:32 +0000
commit9aace6723572438a94378451793ca37deb768e72 (patch)
tree63583d45cf50a8ba4fd24d220fd40b26dac57a25 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parent61361c16aac632367c0137ce74f6d3248edd8932 (diff)
downloadrust-9aace6723572438a94378451793ca37deb768e72.tar.gz
rust-9aace6723572438a94378451793ca37deb768e72.zip
Ensure internal function is safe
The internal function was unsound, it could cause UB in rare cases where
the user inadvertly stored the returned object in a location that could
outlive the TyCtxt.

In order to make it safe, we now take a type context as an argument to
the internal fn, and we ensure that interned items are lifted using the
provided context.

Thus, this change ensures that the compiler can properly enforce
that the object does not outlive the type context it was lifted to.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions