Edit report at http://bugs.php.net/bug.php?id=51248&edit=1

 ID:                 51248
 Updated by:         and...@php.net
 Reported by:        mbecc...@php.net
 Summary:            Segmentation fault in mysql_fetch_array
 Status:             Assigned
 Type:               Bug
 Package:            MySQL related
 Operating System:   FreeBSD 6.2
 PHP Version:        5.3.2
 Assigned To:        mysql
 Block user comment: N

 New Comment:

No crash on 64bit MacOS X 10.6.4 , with or without the flags, libmysql.
MySQL is 5.5.2


Previous Comments:
------------------------------------------------------------------------
[2010-10-06 13:54:59] and...@php.net

forgot to mention that I used the -g -fstack-protector-all

------------------------------------------------------------------------
[2010-10-06 13:52:59] and...@php.net

I get no crash on Ubuntu 9.10 x86, PHP 5.3.4-dev, MySQL 5.1.51 . Neither
with libmysql nor with mysqlnd, but by looking at the stacktrace it
should not matter much. Will get it checked on Mac OS

------------------------------------------------------------------------
[2010-09-30 11:53:28] aaphp at mailinator dot com

Received this using 5.3.3 on Apache 2.2.16 w/ Cpanel; CENTOS 4.8 x86_64
and osCommerce.



Caused segfaults logged to /var/log/messages:

Sep 29 20:23:22 hostname kernel: conftest[30619]: segfault at
0000000000000001 rip 0000000000405dae rsp 0000007fbffff250 error 4

Sep 29 21:36:28 hostname kernel: php[20444]: segfault at
0000002a00000014 rip 0000000000741da3 rsp 0000007fbfffabb0 error 4



And php errors in /var/log/httpd/error_log:

[Wed Sep 29 20:28:02 2010] [error] [client x.x.x.x] Premature end of
script headers: php5



The errors are consistent - nothing loads on the site but 500 Internal
Server Errors.  Did not go away until PHP was downgraded to 5.2.14 or
the following change made to the script:



The Line:

return mysql_fetch_array($db_query, MYSQL_ASSOC);



Once changed to:

return mysql_fetch_assoc($db_query);



The error ceases & site functions as expected.

------------------------------------------------------------------------
[2010-09-24 20:38:23] janinemueller26 at gmail dot com

I had also a mysql error with drupal and mysql on
http://www.sportwettentipp.com, 

but update to the newest version and works fine, thanks for the bug
fixing.

------------------------------------------------------------------------
[2010-09-04 20:54:38] php at group dot apple dot com

As I noted, the problem disappears when compiled debug, so perhaps that
option was 

enabled in your build?



Since valgrind reports heap issues and this appears to be stack
corruption, what 

data are you looking for? Mac OS X has a number of great debugging and
analysis 

tools (Instruments, Shark, dtrace) I can use to get what you need.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    http://bugs.php.net/bug.php?id=51248


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51248&edit=1

Reply via email to