libphp.so dumps core in sapi_register_post_entry+0x31()
未关闭
还没有人认领这个 Issue。
Bug
SAPI: apache2handler
Status: Needs Triage
- 主要语言
- C
- 星标
- 40.4k
- 派生
- 8.2k
- 平均合并
- 2 天 13 小时
- 30 天内合并 PR
- 96
描述
Description
Starting Apache with libphp imediately ends with core dump:
httpd:core> $C
7fdd8f067660 libphp8.1.so`sapi_register_post_entry+0x31()
7fdd8f067680 libphp8.1.so`sapi_register_post_entries+0x2a()
7fdd8f067690 libphp8.1.so`php_setup_sapi_content_types+0x10()
7fdd8f0676e0 libphp8.1.so`tsrm_update_active_threads+0xb0()
7fdd8f067720 libphp8.1.so`ts_allocate_fast_id+0xe3()
7fdd8f067760 libphp8.1.so`php_apache_server_startup+0x6c()
7fdd8f0677b0 ap_run_post_config+0x54()
7fdd8f0678f0 main+0x1873()
7fdd8f067900 0x465fc4()
This worked well with PHP 8.1.0.
git bisessct gives following output:
72f8dbb31295e4e5633a9033c6d91a45d102c485 is the first bad commit
commit 72f8dbb31295e4e5633a9033c6d91a45d102c485
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Nov 24 20:43:30 2021 +0300
Fixed bug #81634 (ZEND_ENABLE_STATIC_TSRMLS_CACHE produces extensionswith the STATIC_TLS flag)
TSRM/TSRM.h | 8 ++++++--
Zend/zend.c | 2 +-
Zend/zend.h | 4 ++++
build/php.m4 | 2 +-
win32/build/confutils.js | 2 +-
5 files changed, 13 insertions(+), 5 deletions(-)
Apply reversely patch from above commit allows me to use PHP 8.1.5.
PHP Version
PHP 8.1.5
Operating System
Solaris
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先在 Solaris 上重现 Apache/libphp 的启动崩溃,并检查第一个引入问题的提交 72f8dbb31295e4e5633a9033c6d91a45d102c485。阅读该更改附近的 TSRM/TSRM.h、Zend/zend.c、Zend/zend.h 和 build/php.m4。当 PHP 8.1.5 能够在不生成 core dump 的情况下通过 libphp 启动,并且该回归由适当的测试覆盖时,即可认为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- c, php
- 领域
- backend, operating-systems
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 28/100