-
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.
Fix GH-17727: JIT SEGV on OOM in dtor when creating backtrace
This became visible after GH-17056 was merged, but technically the lack of setting the opline is also present on lower branches. We set the opline to mirror the SAVE_OPLINE() from ZEND_INIT_STATIC_METHOD_CALL(). Closes GH-17732.
- Loading branch information
Showing
2 changed files
with
32 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--TEST-- | ||
GH-17727 (JIT SEGV on OOM in dtor when creating backtrace) | ||
--EXTENSIONS-- | ||
opcache | ||
--SKIPIF-- | ||
<?php | ||
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); | ||
?> | ||
--INI-- | ||
opcache.jit=1254 | ||
fatal_error_backtraces=1 | ||
memory_limit=2M | ||
--CREDITS-- | ||
arnaud-lb | ||
YuanchengJiang | ||
--FILE-- | ||
<?php | ||
$str = str_repeat('a', 1024 * 1024 * 1.25); | ||
class DestructableObject | ||
{ | ||
public function __destruct() | ||
{ | ||
DestructableObject::__destruct(); | ||
} | ||
} | ||
$_ = new DestructableObject(); | ||
?> | ||
--EXPECTF-- | ||
Fatal error: Allowed memory size of 2097152 bytes exhausted %s | ||
Stack trace: | ||
%A |