PHPDBG ASAN failures under tracked alloc without zend alloc
未关闭
还没有人认领这个 Issue。
Bug
SAPI: phpdbg
- 主要语言
- C
- 星标
- 40.4k
- 派生
- 8.2k
- 平均合并
- 2 天 13 小时
- 30 天内合并 PR
- 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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 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