PHP 8.2.0 access violation while executing a 'foreach' loop
まだ誰も着手していません。
- 主要言語
- C
- スター
- 40.4k
- フォーク
- 8.2k
- 平均マージ
- 2日 13時間
- マージ済み PR(30日)
- 96
説明
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 :-\
I added the extract also to here. But, might not help much as it works. I assigned the variables for the loop with the same values just before the loop which crashes. Background: Application is a house automation server. Loop creates the commands for an i2c command.
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
PHP_8.2.0_Crash_php.txt
PHP Version
PHP 8.2.0 (cli) (built: Dec 6 2022 15:31:23) (ZTS Visual C++ 2019 x64) - from windows.php.net
Operating System
Windows 10 22H2 Build 19045.2311
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず PHP_8.2.0_Crash_php.txt と PHP_8.2.0_Crash.txt を確認し、次に Windows 上で PHP 8.2.0 と 8.1.13 を使って提供された extract を実行し、違いを確認します。進捗には、複雑な foreach の失敗を再現可能なケースに縮小することが必要です。アクセス違反を再現でき、その原因または修正が確定すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- php
- 領域
- backend
- issue の種類
- バグ
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 18/100