[php-src] Issue #10067: PHP 8.2.0 access violation while executing a 'foreach' loop

From: Date: Thu, 08 Dec 2022 08:41:01 +0000
Subject: [php-src] Issue #10067: PHP 8.2.0 access violation while executing a 'foreach' loop
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-243074@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/10067 Author: mdrmdrmdr ### Description Encountered an access violation bug in PHP 8.2.0 while executing a **foreach** loop on an array. It's inside a complex PHP application. Unfortunateley, I cannot reproduce the error with a small extract of the code just with the loop. Using the extract, it works :-\ What I see: - The loop just stops before all array elements are executed and PHP exits immediately without calling any error- or exit-handler. The last command in the loop is executed. The next element is not retrieved. The loop is successfully executed ~10 times. In the next attempt, PHP crashes - No message is written to the prompt - No entry in the PHP error log is created (all error reporting is enabled) - A windows access violation event is created. See attachment (partly in German; hope thats not a problem) - **It workes without errors in PHP 8.1.13** (cli) (built: Nov 22 2022 15:49:14) (ZTS Visual C++ 2019 x64) If I can provide more information, just advise me. [PHP_8.2.0_Crash.txt](https://github.com/php/php-src/files/10183466/PHP_8.2.0_Crash.txt) ### PHP Version PHP 8.2.0 (cli) (built: Dec 6 2022 15:31:23) (ZTS Visual C++ 2019 x64) ### Operating System Windows 10 22H2 Build 19045.2311

« previous php.bugs (#243074) next »