[PATCH] D67244: LangRef: mention MSan's problem with speculative conditional branches.

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 9 15:26:28 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL371461: LangRef: mention MSan's problem with speculative conditional branches. (authored by eugenis, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D67244?vs=219002&id=219440#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67244/new/

https://reviews.llvm.org/D67244

Files:
  llvm/trunk/docs/LangRef.rst


Index: llvm/trunk/docs/LangRef.rst
===================================================================
--- llvm/trunk/docs/LangRef.rst
+++ llvm/trunk/docs/LangRef.rst
@@ -3245,6 +3245,17 @@
 location could clobber arbitrary memory, therefore, it has undefined
 behavior.
 
+**MemorySanitizer**, a detector of uses of uninitialized memory,
+defines a branch with condition that depends on an undef value (or
+certain other values, like e.g. a result of a load from heap-allocated
+memory that has never been stored to) to have an externally visible
+side effect. For this reason functions with *sanitize_memory*
+attribute are not allowed to produce such branches "out of thin
+air". More strictly, an optimization that inserts a conditional branch
+is only valid if in all executions where the branch condition has at
+least one undefined bit, the same branch condition is evaluated in the
+input IR as well.
+
 .. _poisonvalues:
 
 Poison Values


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67244.219440.patch
Type: text/x-patch
Size: 947 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190909/5814ae81/attachment.bin>


More information about the llvm-commits mailing list