Edit report at http://bugs.php.net/bug.php?id=51248&edit=1
ID: 51248
Comment by: php at group dot apple dot com
Reported by: mbeccati@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:
Thank you for attempting to reproduce on Mac OS X. The issue may be the
choice of
compiler, as the problem more readily reproduces with LLVM, which claims
to be
much more aggressive in its stack protection than GCC. One option would
be to try
to build using LLVM as the compiler, i.e.:
CC=/usr/bin/llvm-gcc ./configure ...
Previous Comments:
------------------------------------------------------------------------
[2010-10-06 14:17:47] andrey@php.net
No crash on 64bit MacOS X 10.6.4 , with or without the flags, libmysql.
MySQL is 5.5.2
------------------------------------------------------------------------
[2010-10-06 13:54:59] andrey@php.net
forgot to mention that I used the -g -fstack-protector-all
------------------------------------------------------------------------
[2010-10-06 13:52:59] andrey@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.
------------------------------------------------------------------------
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