php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51231 mysqli::connect() crashes
Submitted: 2010-03-07 23:02 UTC Modified: 2010-04-07 23:50 UTC
From: felipe@php.net Assigned: mysql (profile)
Status: Closed Package: MySQLi related
PHP Version: 5.3SVN-2010-03-07 (SVN) OS: Linux
Private report: No CVE-ID: None
 [2010-03-07 23:02 UTC] felipe@php.net
Description:
------------
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb75376d0 (LWP 14083)]
0xb763b38b in strlen () from /lib/i686/cmov/libc.so.6
(gdb) bt
#0  0xb763b38b in strlen () from /lib/i686/cmov/libc.so.6
#1  0x081f0e69 in php_mysqli_close (mysql=0x9e3a7c4, close_type=0, tsrm_ls=0x9ccd070) at /home/felipe/dev/php5/ext/mysqli/mysqli_api.c:562
#2  0x081ea033 in mysqli_link_free_storage (object=0x9e394f4, tsrm_ls=0x9ccd070) at /home/felipe/dev/php5/ext/mysqli/mysqli.c:225


Test script:
---------------
$x = new mysqli;
$x->connect();

Expected result:
----------------
No crash.

Actual result:
--------------
Warning: mysqli::connect(): (HY000/2002): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in Command line code on line 1
Segmentation fault

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-03-08 00:11 UTC] felipe@php.net
-Status: Open +Status: Assigned
 [2010-03-08 00:12 UTC] felipe@php.net
-Summary: mysqli::connect crashes +Summary: mysqli::connect() crashes
 [2010-04-07 18:36 UTC] andrey@php.net
-Status: Assigned +Status: Feedback
 [2010-04-07 18:36 UTC] andrey@php.net
I can't reproduce it anymore. Felipe, do you can?
 [2010-04-07 23:50 UTC] felipe@php.net
-Status: Feedback +Status: Closed
 [2010-04-07 23:50 UTC] felipe@php.net
It works fine now. :)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 15 18:01:34 2024 UTC