<html>
<body>
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"name": "View Issue",
"url": "https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5537"
},
"description": ""
}
</script>
<div style="font-family: arial, sans-serif"><br/>Comment #2 on issue 5537 by <a href="mailto:kcc@google.com">kcc@google.com</a>: llvm/clang-proto-fuzzer: ASSERT: isLoopInvariant(Operands[i], L) && "SCEVAddRecExpr operand is not loop-invariant<br/><a href="https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5537#c2">https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5537#c2</a><br/><br/>C reproducer: <br/>% cat 5537.c <br/>void foo(int *a) {<br/> a[0] = (15164);<br/> while (((((a[0] * a[0]) * a[0]) * ((a[0] * a[0]) * a[0])) * a[0])) {<br/> a[0] = (a[72] + a[0]);<br/> }<br/> while (((((a[72] * a[0]) * a[0]) * (a[0] * a[0])) * a[0])) {<br/> a[0] = ((1073741824) + a[0]);<br/> }<br/> (void)0;<br/> while ((1 ^ (a[84] & 1))) {<br/> }<br/> while ((1 / (a[0] + (a[0] + 1)))) {<br/> (void)0;<br/> a[28] = 1;<br/> a[0] = (a[0] + (0));<br/> a[0] = (1 / (1 ^ (a[0] + 1)));<br/> }<br/> while ((40)) {<br/> if (a[0]) {<br/> (void)0;<br/> } else {<br/> }<br/> }<br/>}<br/>% clang -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -O3 5537.c PS1=%<br/>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.<br/><br/><br/>-- <br/>You received this message because:<br/> 1. You were specifically CC'd on the issue<br/><br/>You may adjust your notification preferences at:<br/><a href="https://bugs.chromium.org/hosting/settings">https://bugs.chromium.org/hosting/settings</a><br/><br/>Reply to this email to add a comment.</div>
</body>
</html>