php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69716 segfault when enabled mysqli.so module
Submitted: 2015-05-28 06:18 UTC Modified: 2015-05-29 02:35 UTC
From: xiangzhai83 at gmail dot com Assigned:
Status: Closed Package: MySQLi related
PHP Version: master-Git-2015-05-28 (Git) OS: ArchLinux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: xiangzhai83 at gmail dot com
New email:
PHP Version: OS:

 

 [2015-05-28 06:18 UTC] xiangzhai83 at gmail dot com
Description:
------------
$ gdb php
$ r -v

...
Program received signal SIGSEGV, Segmentation fault.
zend_startup_module_ex (module=0x0) at /data/project/php/php-src/Zend/zend_API.c:1818
1818		if (module->module_started) {

$ print 
$1 = (zend_module_entry *) 0x0

so zend_module_entry* module is a NULL ptr.

when disabled mysqli.so module, then php -v is ok.

gcc 5.1.1
ArchLinux 4.0.4-2-ARCH ... x86_64 GNU/Linux
libmariadbclient 10.0.18

my configure argument is almost like ArchLinux`s PKGBUILD https://projects.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/php#n61

Regards,
Leslie Zhai


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-05-29 02:35 UTC] xiangzhai83 at gmail dot com
-Status: Open +Status: Closed
 [2015-05-29 02:35 UTC] xiangzhai83 at gmail dot com
mysqli.so module worked for PHP-7.x git master, but I have no idea why it failed to work yesterday ;-) https://twitter.com/xiangzhai/status/604113173260558336/photo/1

for DEBUG patch

diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 757becf..7a7a7c6 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -1815,6 +1815,9 @@ ZEND_API int zend_startup_module_ex(zend_module_entry *module) /* {{{ */
        size_t name_len;
        zend_string *lcname;
 
+    if (module)
+        printf("DEBUG: %s line %d: %s\n", __func__, __LINE__, module->name);
+
        if (module->module_started) {
                return SUCCESS;
        }
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 16:01:36 2025 UTC