-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into…
… PHP-5.5 # By Xinchen Hui (2) and Michael Wallner (1) # Via Michael Wallner * 'PHP-5.5' of https://git.php.net/repository/php-src: double test timeout for travis Add test for ISSUE #128 Fixed bug #65665 (Exception not properly caught when opcache enabled)
- Loading branch information
Showing
5 changed files
with
145 additions
and
5 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
--TEST-- | ||
Bug #65665 (Exception not properly caught when opcache enabled) | ||
--INI-- | ||
opcache.enable=1 | ||
opcache.enable_cli=1 | ||
--SKIPIF-- | ||
<?php require_once('skipif.inc'); ?> | ||
--FILE-- | ||
<?php | ||
function foo() { | ||
try | ||
{ | ||
switch (1) | ||
{ | ||
case 0: | ||
try | ||
{ | ||
|
||
} | ||
catch (Exception $e) | ||
{ | ||
|
||
} | ||
|
||
break; | ||
|
||
case 1: | ||
try | ||
{ | ||
throw new Exception('aaa'); | ||
} | ||
catch (Exception $e) | ||
{ | ||
echo "correct\n"; | ||
} | ||
|
||
break; | ||
} | ||
} | ||
catch (Exception $e) | ||
{ | ||
echo "wrong\n"; | ||
} | ||
return; | ||
} | ||
|
||
function foo1() { | ||
try | ||
{ | ||
switch (1) | ||
{ | ||
case 0: | ||
try | ||
{ | ||
|
||
} | ||
catch (Exception $e) | ||
{ | ||
dummy: | ||
echo "ect\n"; | ||
} | ||
|
||
break; | ||
|
||
case 1: | ||
try | ||
{ | ||
throw new Exception('aaa'); | ||
} | ||
catch (Exception $e) | ||
{ | ||
echo "corr"; | ||
goto dummy; | ||
} | ||
break; | ||
} | ||
} | ||
catch (Exception $e) | ||
{ | ||
echo "wrong\n"; | ||
} | ||
return; | ||
} | ||
|
||
function foo2() { | ||
try | ||
{ | ||
switch (1) | ||
{ | ||
case 0: | ||
try | ||
{ | ||
dummy: | ||
throw new Exception('aaa'); | ||
} | ||
catch (Exception $e) | ||
{ | ||
echo "correct\n"; | ||
} | ||
|
||
break; | ||
|
||
case 1: | ||
goto dummy; | ||
break; | ||
} | ||
} | ||
catch (Exception $e) | ||
{ | ||
echo "wrong\n"; | ||
} | ||
return; | ||
} | ||
foo();foo1();foo2(); | ||
--EXPECT-- | ||
correct | ||
correct | ||
correct |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--TEST-- | ||
ISSUE #128 (opcache_invalidate segmentation fault) | ||
--INI-- | ||
opcache.enable=1 | ||
opcache.enable_cli=1 | ||
opcache.optimization_level=-1 | ||
--SKIPIF-- | ||
<?php require_once('skipif.inc'); ?> | ||
--FILE-- | ||
<?php | ||
var_dump(opcache_invalidate('1')); | ||
var_dump("okey"); | ||
?> | ||
--EXPECT-- | ||
bool(false) | ||
string(4) "okey" |