vsk added a comment.

The "Cannot represent a difference across sections" error is almost certainly 
related to -fsanitize=function. Time permitting, could you file a separate PR 
for that and attach the IR? It'd be great to know whether the issue reproduces 
without coroutines involved.

Also, could you check in a simple test (something along the lines of what you 
posted to llvm-dev)? You can just pass '-emit-llvm -fcoroutines 
-fsanitize=null' and check that the string '__ubsan' doesn't appear.



================
Comment at: lib/CodeGen/CodeGenFunction.cpp:1307
+  if (Body && Body->getStmtClass() == Stmt::CoroutineBodyStmtClass)
+    SanOpts.clear();
+
----------------
The suppression should live right next to the logic which handles no_sanitize 
attributes, in CGF::StartFunction. In general you can end up in 
CGF::StartFunction without the immediate caller being CGF::GenerateCode.


Repository:
  rC Clang

https://reviews.llvm.org/D44672



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to