about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorGary Guo <gary@garyguo.net>2021-08-10 11:50:33 +0100
committerGary Guo <gary@garyguo.net>2021-08-12 16:16:57 +0100
commit1fb1643129f9ac6a63bddf04d69e28632615c0df (patch)
treeaa035ac611fae3e47bacef57441174539f7bedc0 /src/test
parentae90dcf0207c57c3034f00b07048d63f8b2363c8 (diff)
downloadrust-1fb1643129f9ac6a63bddf04d69e28632615c0df.tar.gz
rust-1fb1643129f9ac6a63bddf04d69e28632615c0df.zip
Implement `black_box` using intrinsic
The new implementation allows some `memcpy`s to be optimized away,
so the uninit value in ui/sanitize/memory.rs is constructed directly
onto the return place. Therefore the sanitizer now says that the
value is allocated by `main` rather than `random`.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/sanitize/memory.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/ui/sanitize/memory.rs b/src/test/ui/sanitize/memory.rs
index 48a482a13aa..b53f19a5b01 100644
--- a/src/test/ui/sanitize/memory.rs
+++ b/src/test/ui/sanitize/memory.rs
@@ -6,7 +6,7 @@
 // run-fail
 // error-pattern: MemorySanitizer: use-of-uninitialized-value
 // error-pattern: Uninitialized value was created by an allocation
-// error-pattern: in the stack frame of function 'random'
+// error-pattern: in the stack frame of function 'main'
 //
 // This test case intentionally limits the usage of the std,
 // since it will be linked with an uninstrumented version of it.