Verifier: disable iterator checks, turn verifier on for systemlib @override-unit-failures
It's better to have some checks than none. The only checks failing in systemlib are iterator lifetime things, which it seems like we're not about to fix. Run the verifier on systemlib but only in debug builds.
Esse commit está contido em:
@@ -2649,13 +2649,15 @@ Unit* UnitEmitter::create() {
|
||||
Trace::traceRelease(u->toString());
|
||||
}
|
||||
|
||||
static const bool kAlwaysVerify = getenv("HHVM_ALWAYS_VERIFY");
|
||||
static const bool kVerifyNonSystem = getenv("HHVM_VERIFY");
|
||||
static const bool kVerify = getenv("HHVM_VERIFY");
|
||||
static const bool kVerifyVerbose = getenv("HHVM_VERIFY_VERBOSE");
|
||||
const bool doVerify = kAlwaysVerify ||
|
||||
(kVerifyNonSystem && !u->filepath()->empty() &&
|
||||
!boost::ends_with(u->filepath()->data(), "systemlib.php")) ||
|
||||
boost::ends_with(u->filepath()->data(), "hhas");
|
||||
|
||||
const bool doVerify =
|
||||
kVerify ||
|
||||
boost::ends_with(u->filepath()->data(), "hhas") ||
|
||||
(debug && (u->filepath()->empty() ||
|
||||
boost::ends_with(u->filepath()->data(), "systemlib.php")));
|
||||
|
||||
if (doVerify) {
|
||||
Verifier::checkUnit(u, kVerifyVerbose);
|
||||
}
|
||||
|
||||
@@ -903,7 +903,9 @@ bool FuncChecker::checkFlow() {
|
||||
ok &= checkInputs(&cur, pc, b);
|
||||
if (isTF(pc)) ok &= checkTerminal(&cur, pc);
|
||||
if (isFF(pc)) ok &= checkFpi(&cur, pc, b);
|
||||
if (isIter(pc)) ok &= checkIter(&cur, pc);
|
||||
// TODO(#1097182) Iterator checking is disabled, because
|
||||
// systemlib currently doesn't pass it.
|
||||
/* if (isIter(pc)) ok &= checkIter(&cur, pc); */
|
||||
ok &= checkOutputs(&cur, pc, b);
|
||||
}
|
||||
ok &= checkSuccEdges(b, &cur);
|
||||
@@ -1023,12 +1025,14 @@ bool FuncChecker::checkEdge(Block* b, const State& cur, Block *t) {
|
||||
}
|
||||
}
|
||||
// Check iterator variable state.
|
||||
for (int i = 0, n = numIters(); i < n; i++) {
|
||||
if (state.iters[i] != cur.iters[i]) {
|
||||
verify_error("mismatched iterator state on edge B%d->B%d, "
|
||||
"current %s target %s\n", b->id, t->id,
|
||||
iterToString(cur).c_str(), iterToString(state).c_str());
|
||||
return false;
|
||||
if (false /* TODO(#1097182): Iterator verification disabled */) {
|
||||
for (int i = 0, n = numIters(); i < n; i++) {
|
||||
if (state.iters[i] != cur.iters[i]) {
|
||||
verify_error("mismatched iterator state on edge B%d->B%d, "
|
||||
"current %s target %s\n", b->id, t->id,
|
||||
iterToString(cur).c_str(), iterToString(state).c_str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário