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: Feedback
Type: Bug
Package: MySQL related
Operating System: FreeBSD 6.2
PHP Version: 5.3.2
Assigned To: mysql
Block user comment: N
New Comment:
Here are the configure flags I use:
------
--with-apxs2=$(USRSBINDIR)/apxs \
--enable-cli \
--with-config-file-path=/etc \
--with-libxml-dir=$(USRDIR) \
--with-openssl=$(USRDIR) \
--with-kerberos=$(USRDIR) \
--with-zlib=$(USRDIR) \
--enable-bcmath \
--with-bz2=$(USRDIR) \
--enable-calendar \
--with-curl=$(USRDIR) \
--enable-exif \
--enable-ftp \
--with-gd \
--with-freetype-dir=$(DSTROOT)$(USRDIR)/local \
--with-jpeg-dir=$(DSTROOT)$(USRDIR)/local \
--with-png-dir=$(DSTROOT)$(USRDIR)/local \
--enable-gd-native-ttf \
--with-ldap=$(USRDIR) \
--with-ldap-sasl=$(USRDIR) \
--enable-mbstring \
--enable-mbregex \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-mysql-sock=/var/mysql/mysql.sock \
--with-iodbc=$(USRDIR) \
--enable-shmop \
--with-snmp=$(USRDIR) \
--enable-soap \
--enable-sockets \
--enable-suhosin \
--enable-sysvmsg --enable-sysvsem --enable-sysvshm \
--with-xmlrpc \
--with-iconv-dir=$(USRDIR) \
--with-xsl=$(USRDIR) \
--enable-zend-multibyte \
--enable-zip
------
It may be relevant that I have applied the Suhosin patch to the sources.
I will inspect the patch to see if
it's modifying the crashing code in some way.
In addition, I set CFLAGS="-Os -g -fstack-protector-all" before calling
configure.
I will build again and see if I can tease out more information.
Previous Comments:
------------------------------------------------------------------------
[2010-10-13 12:33:21] andrey@php.net
Again, no crash
andrey@vihren:~/dev/php5.3-201010130830> $ ./php a.php
mysql version: 5.1.44
andrey@vihren:~/dev/php5.3-201010130830> $ cat config.nice
#! /bin/sh
#
# Created by configure
CC='/usr/bin/llvm-gcc' \
'./configure' \
'--with-mysql=mysqlnd' \
'--with-mysqli=mysqlnd' \
'--disable-libxml' \
'--disable-dom' \
'--disable-simplexml' \
'--disable-xml' \
'--disable-xmlreader' \
'--disable-xmlwriter' \
'--without-pear' \
"$@"
andrey@vihren:~/dev/php5.3-201010130830> $ uname -a
Darwin vihren 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53
PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386
The system is a MacOS X 10.6.something
------------------------------------------------------------------------
[2010-10-07 04:33:41] php at group dot apple dot com
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 ...
------------------------------------------------------------------------
[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
------------------------------------------------------------------------
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