diff options
author | Guy Harris <gharris@sonic.net> | 2020-05-18 19:55:56 -0700 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2020-05-18 19:55:56 -0700 |
commit | f2d84366a864f7b41f59ef47334f6a53aa914b32 (patch) | |
tree | f25f59454cc4aa11aaa395ddf60446b81f4c30be /gencode.c | |
parent | f95f189f4f45f3a96a4599610f183a6ea3720b65 (diff) |
optimizer: add a hack to try to catch certain optimizer loops.
Some filters cause us to get stuck in a loop where the optimizer does
nothing other than swap two chunks of code over and over again, rather
than reaching a fixed point. For now, if we have performed an optimizer
pass that has done nothing other than move code, we start a counter and,
if we have 100 passes that have done nothing other than move code, we
assume we're in a cycle.
(Yes, we need a non-heuristic way of detecting, or preventing, such a
cycle.)
This should address this oss-fuzz issue:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10930
as well as GitHub issue #112.
GitHub pull request #777 is for the same issue, but just imposes a
maximum of 1000 optimizer passes; this fix allows more passes, as long
as we keep doing things *other* than just moving code.
Diffstat (limited to 'gencode.c')
0 files changed, 0 insertions, 0 deletions