File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 3
3
?? ??? 2019, PHP 7.2.17
4
4
5
5
- Core:
6
+ . Fixed bug #77660 (Segmentation fault on break 2147483648). (Laruence)
6
7
. Fixed bug #77652 (Anonymous classes can lose their interface information).
7
8
(Nikita)
8
9
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #77660 (Segmentation fault on break 2147483648)
3
+ --SKIPIF--
4
+ <?php if (PHP_INT_SIZE != 8 ) die ("skip this test is for 64bit platform only " ); ?>
5
+ --FILE--
6
+ <?php
7
+ for (;;) break 2147483648 ;
8
+ ?>
9
+ --EXPECTF--
10
+ Fatal error: Cannot 'break' 2147483648 levels in %sbug77660.php on line %d
Original file line number Diff line number Diff line change @@ -4508,7 +4508,7 @@ void zend_compile_break_continue(zend_ast *ast) /* {{{ */
4508
4508
zend_ast * depth_ast = ast -> child [0 ];
4509
4509
4510
4510
zend_op * opline ;
4511
- int depth ;
4511
+ zend_long depth ;
4512
4512
4513
4513
ZEND_ASSERT (ast -> kind == ZEND_AST_BREAK || ast -> kind == ZEND_AST_CONTINUE );
4514
4514
@@ -4535,7 +4535,7 @@ void zend_compile_break_continue(zend_ast *ast) /* {{{ */
4535
4535
ast -> kind == ZEND_AST_BREAK ? "break" : "continue" );
4536
4536
} else {
4537
4537
if (!zend_handle_loops_and_finally_ex (depth , NULL )) {
4538
- zend_error_noreturn (E_COMPILE_ERROR , "Cannot '%s' %d level%s" ,
4538
+ zend_error_noreturn (E_COMPILE_ERROR , "Cannot '%s' " ZEND_LONG_FMT " level%s" ,
4539
4539
ast -> kind == ZEND_AST_BREAK ? "break" : "continue" ,
4540
4540
depth , depth == 1 ? "" : "s" );
4541
4541
}
You can’t perform that action at this time.
0 commit comments