if (!StNotNull)
return NULL;
+ // FIXME: Temporarily disable out-of-bounds checking until we make
+ // the logic reflect recent changes to CastRegion and friends.
+#if 0
// Check for out-of-bound array access.
if (isa<loc::MemRegionVal>(LV)) {
const MemRegion* R = cast<loc::MemRegionVal>(LV).getRegion();
StNotNull = StInBound;
}
}
+#endif
// Generate a new node indicating the checks succeed.
return Builder->generateNode(Ex, StNotNull, Pred,
return false;
Expr *theValueExpr = CE->getArg(2);
- const PointerType *theValueType = theValueExpr->getType()->getAs<PointerType>();
+ const PointerType *theValueType =
+ theValueExpr->getType()->getAs<PointerType>();
// theValueType not a pointer?
if (!theValueType)
struct load_wine *cmd = (void*) &wonky[1];
cmd = cmd;
char *p = (void*) &wonky[1];
- *p = 1;
+ *p = 1; // no-warning
kernel_tea_cheese_t *q = &wonky[1];
- kernel_tea_cheese_t r = *q; // expected-warning{{out-of-bound memory position}}
+ // This test case tests both the RegionStore logic (doesn't crash) and
+ // the out-of-bounds checking. We don't expect the warning for now since
+ // out-of-bound checking is temporarily disabled.
+ kernel_tea_cheese_t r = *q; // eventually-warning{{out-of-bound memory position}}
}