-
-
Save nikic/072a365f6fe2f07e523757de0eb6c61f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Zend/Optimizer/zend_cfg.c b/Zend/Optimizer/zend_cfg.c | |
index badf9d298b..a8f6588f2e 100644 | |
--- a/Zend/Optimizer/zend_cfg.c | |
+++ b/Zend/Optimizer/zend_cfg.c | |
@@ -887,6 +887,10 @@ ZEND_API int zend_cfg_identify_loops(const zend_op_array *op_array, zend_cfg *cf | |
} | |
while (zend_worklist_len(&work)) { | |
j = zend_worklist_pop(&work); | |
+ if (j != 0 && blocks[j].idom < 0) { | |
+ /* Ignore blocks that are unreachable or only abnormally reachable. */ | |
+ continue; | |
+ } | |
while (blocks[j].loop_header >= 0) { | |
j = blocks[j].loop_header; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment