about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc/src
diff options
context:
space:
mode:
authorTrevor Gross <t.gross35@gmail.com>2024-08-27 01:46:51 -0500
committerGitHub <noreply@github.com>2024-08-27 01:46:51 -0500
commit427019e37ff340a38c8354a8e03580cfbc61a5e7 (patch)
tree11cf1b246b427bb2fda659d2b401c066da85ed09 /compiler/rustc_codegen_gcc/src
parente209b05037e418c8984993bf499d310655cced13 (diff)
parent8b18c6bdd3d61dda5fe8c4ed378286abec2a9bc4 (diff)
downloadrust-427019e37ff340a38c8354a8e03580cfbc61a5e7.tar.gz
rust-427019e37ff340a38c8354a8e03580cfbc61a5e7.zip
Rollup merge of #128942 - RalfJung:interpret-weak-memory, r=saethlin
miri weak memory emulation: put previous value into initial store buffer

Fixes https://github.com/rust-lang/miri/issues/2164 by doing a read before each atomic write so that we can initialize the store buffer. The read suppresses memory access hooks and UB exceptions, to avoid otherwise influencing the program behavior. If the read fails, we store that as `None` in the store buffer, so that when an atomic read races with the first atomic write to some memory and previously the memory was uninitialized, we can report UB due to reading uninit memory.

``@cbeuw`` this changes a bit the way we initialize the store buffers. Not sure if you still remember all this code, but if you could have a look to make sure this still makes sense, that would be great. :)

r? ``@saethlin``
Diffstat (limited to 'compiler/rustc_codegen_gcc/src')
0 files changed, 0 insertions, 0 deletions