[llvm-bugs] Issue 5537 in oss-fuzz: llvm/clang-proto-fuzzer: ASSERT: isLoopInvariant(Operands[i], L) && "SCEVAddRecExpr operand is not loop-invariant

k… via monorail via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jan 22 13:21:54 PST 2018


Comment #2 on issue 5537 by kcc at google.com: llvm/clang-proto-fuzzer:  
ASSERT: isLoopInvariant(Operands[i], L) && "SCEVAddRecExpr operand is not  
loop-invariant
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5537#c2

C reproducer:
% cat 5537.c
void foo(int *a) {
   a[0] = (15164);
   while (((((a[0] * a[0]) * a[0]) * ((a[0] * a[0]) * a[0])) * a[0])) {
     a[0] = (a[72] + a[0]);
   }
   while (((((a[72] * a[0]) * a[0]) * (a[0] * a[0])) * a[0])) {
     a[0] = ((1073741824) + a[0]);
   }
   (void)0;
   while ((1 ^ (a[84] & 1))) {
   }
   while ((1 / (a[0] + (a[0] + 1)))) {
     (void)0;
     a[28] = 1;
     a[0] = (a[0] + (0));
     a[0] = (1 / (1 ^ (a[0] + 1)));
   }
   while ((40)) {
     if (a[0]) {
       (void)0;
     } else {
     }
   }
}
% clang -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -O3 5537.c PS1=%
clang: lib/Analysis/ScalarEvolution.cpp:3269: const llvm::SCEV  
*llvm::ScalarEvolution::getAddRecExpr(SmallVectorImpl<const llvm::SCEV *>  
&, const llvm::Loop *, SCEV::NoWrapFlags): Assertion  
`isLoopInvariant(Operands[i], L) && "SCEVAddRecExpr operand is not  
loop-invariant!"' failed.


-- 
You received this message because:
   1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180122/07169348/attachment.html>


More information about the llvm-bugs mailing list