[PATCH] D12955: Fix assertion in inline assembler IR gen

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 18 14:19:57 PDT 2015


aaron.ballman added a comment.

Generally LGTM, with one question about guarding against overflow.


================
Comment at: lib/Sema/SemaStmtAsm.cpp:447
@@ +446,3 @@
+    // Make sure no more than one input constraint matches each output.
+    if (InputMatchedToOutput[TiedTo] != ~0U) {
+      Diag(NS->getInputExpr(i)->getLocStart(),
----------------
Is it possible for InputConstraintsInfos.size() to be greater than OutputConstrainInfos.size()? Basically, I'm worried about buffer overflow here with TiedTo.


http://reviews.llvm.org/D12955





More information about the cfe-commits mailing list