From 957cb13a4959ed6a802508f14317253bf06f82cd Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 1 Mar 2021 23:57:20 +0300 Subject: Fixed bug #80802: (zend_jit_fetch_indirect_var assert failure with tracing JIT) --- ext/opcache/tests/jit/bug80802.phpt | 49 +++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 ext/opcache/tests/jit/bug80802.phpt (limited to 'ext/opcache') diff --git a/ext/opcache/tests/jit/bug80802.phpt b/ext/opcache/tests/jit/bug80802.phpt new file mode 100644 index 0000000000..89a116cc92 --- /dev/null +++ b/ext/opcache/tests/jit/bug80802.phpt @@ -0,0 +1,49 @@ +--TEST-- +Bug #80802: zend_jit_fetch_indirect_var assert failure with tracing JIT +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.jit_buffer_size=1M +opcache.jit=tracing +--SKIPIF-- + +--FILE-- +reallyDestruct(); + if(self::$threadLocalStorage !== null and isset(self::$threadLocalStorage[$h = spl_object_id($this)])){ + unset(self::$threadLocalStorage[$h]); + if(self::$threadLocalStorage->count() === 0){ + self::$threadLocalStorage = null; + } + } + } + + protected function reallyDestruct() : void{ + + } +} + +class Task extends AsyncTask{ + public function __construct(){ + $this->storeLocal("thing1", new stdClass); + } +} + +for($i = 0; $i < 10000; ++$i){ + new Task; +} +echo "OK\n"; +?> +--EXPECT-- +OK -- cgit v1.2.1