php / php/php-src

PHPDBG ASAN failures under tracked alloc without zend alloc

オープン
#11,053 コメント 9 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Bug SAPI: phpdbg
主要言語
C
スター
40.4k
フォーク
8.2k
平均マージ
2日 13時間
マージ済み PR(30日)
96

説明

Description

The following tests fail with USE_TRACKED_ALLOC=1 and USE_ZEND_ALLOC=0 under ASAN:

Bug #73927 (phpdbg fails with windows error prompt at "watch array") [sapi/phpdbg/tests/bug73927.phpt]
Test simple recursive watchpoint [sapi/phpdbg/tests/watch_001.phpt]
Test simple array watchpoint with replace [sapi/phpdbg/tests/watch_002.phpt]
Test simple watchpoint with replace [sapi/phpdbg/tests/watch_003.phpt]
Test detection of inline string manipulations on zval watch [sapi/phpdbg/tests/watch_004.phpt]
Test proper watch comparisons when having multiple levels of indirection from a zval to its value [sapi/phpdbg/tests/watch_005.phpt]
Test multiple watch elements pointing to the same watchpoint [sapi/phpdbg/tests/watch_006.phpt]

Some fail with:

Zend/zend_alloc.c:2806: tracked_get_size_zv: Assertion size_zv && "Trying to free pointer not allocated through ZendMM"' failed.`

and some fail with a use-after-free message

PHP Version

current master, stable versions not tested

Operating System

Linux 6.2.10

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

ASAN 下で USE_TRACKED_ALLOC=1 および USE_ZEND_ALLOC=0 を使用して失敗を再現し、まず一覧にある sapi/phpdbg/tests/*.phpt のケースから始めます。Zend/zend_alloc.c の tracked_get_size_zv アサーション付近を読み、アサーションの失敗と報告された use-after-free メッセージを比較します。この構成ですべての一覧にある phpdbg watchpoint テストがパスすれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
c
領域
devtools, testing-qa
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。