[flags] Avoid endless lops when enforcing flag implications
Change-Id: Ide8935a02cb64134c3bdeb8b3e38e9a6e043e13c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3610432 Reviewed-by: Patrick Thier <pthier@chromium.org> Commit-Queue: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/main@{#80256}
This commit is contained in:
parent
4837f37279
commit
42138ac2e9
@ -841,11 +841,15 @@ bool TriggerImplication(bool premise, const char* premise_name,
|
||||
void FlagList::EnforceFlagImplications() {
|
||||
flag_hash = 0;
|
||||
bool changed;
|
||||
int iteration = 0;
|
||||
do {
|
||||
changed = false;
|
||||
#define FLAG_MODE_DEFINE_IMPLICATIONS
|
||||
#include "src/flags/flag-definitions.h" // NOLINT(build/include)
|
||||
#undef FLAG_MODE_DEFINE_IMPLICATIONS
|
||||
// Make sure flag definitions are not touring complete. A.k.a avoid endless
|
||||
// loops in case of buggy configurations.
|
||||
CHECK_LT(iteration++, 1000);
|
||||
} while (changed);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user