about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-03-06 12:22:18 -0500
committerGitHub <noreply@github.com>2025-03-06 12:22:18 -0500
commitb7b2179b5e526f3a84da2e5f3667b512bd6339bc (patch)
tree8a7ad0316683cb22d0405d334247d4a2bc34cfb8 /compiler/rustc_codegen_llvm/src
parent59cd96770b1ed1d16b4be338fff83052ee7db854 (diff)
parent88f988cf139797edd56aea011998d5c9f07b5685 (diff)
downloadrust-b7b2179b5e526f3a84da2e5f3667b512bd6339bc.tar.gz
rust-b7b2179b5e526f3a84da2e5f3667b512bd6339bc.zip
Rollup merge of #137802 - RalfJung:miri-native-call-exposed, r=oli-obk
miri native-call support: all previously exposed provenance is accessible to the callee

When Miri invokes a native C function, the memory C can access needs to be "prepared": to avoid false positives, we need to consider all that memory initialized, and we need to consider it to have arbitrary provenance. So far we did this for all pointers passed to C, but not for pointers that were exposed already before the native call. This PR adjusts the logic so that we now "prepare" all memory that has ever been exposed.

This fixes cases such as:
- cast a pointer to integer, send that integer to C, and access the memory there (`test_pass_ptr_as_int`)
- send a pointer to some memory to C, which stores it somewhere; then in Rust store another pointer in that memory, and access that via C (`test_pass_ptr_via_previously_shared_mem`)

r? `````@oli-obk`````
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions