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

 ID:               51248
 Updated by:       php-bugs@lists.php.net
 Reported by:      mbecc...@php.net
 Summary:          Segmentation fault in mysql_fetch_array
-Status:           Feedback
+Status:           No Feedback
 Type:             Bug
 Package:          MySQL related
 Operating System: FreeBSD 6.2
 PHP Version:      5.3.2
 Assigned To:      mysql

 New Comment:

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


Previous Comments:
------------------------------------------------------------------------
[2010-12-02 05:45:57] php at group dot apple dot com

The second patch is the same patch applied for http://bugs.php.net/bug.php?
id=52636, which is included with 5.3.4RC1.

The first patch does not appear to be in the source tree yet.

------------------------------------------------------------------------
[2010-12-02 03:54:35] php at group dot apple dot com

I found the problem and have created two patch files. One (arches.patch) 
addresses 
the broader architectural problems of multi-architecture builds. The second 
(php_mysql_fetch_hash.patch) addresses the flaw which causes this crash, namely 
that a long is written to an int.

------------------------------------------------------------------------
[2010-11-30 06:38:01] php at group dot apple dot com

The multi-architecture problem, while valid and now correct, did not address 
the 
crash. I continue to investigate.

------------------------------------------------------------------------
[2010-11-18 08:27:53] php at group dot apple dot com

I think I may have discovered the culprit: mistaken architecture information! 
Here are 
sample runs using different architectures:
# arch -i386 /usr/bin/php /build/mysql_fetch_array_8264855.php
mysql version: 5.0.91-log
# arch -x86_64 /usr/bin/php /build/mysql_fetch_array_8264855.php
zsh: segmentation fault  arch -x86_64 /usr/bin/php 
/build/mysql_fetch_array_8264855.php


Mac OS X builds "fat", i.e. multiple-architectures in a single compilation pass 
by 
passing "-arch i386 -arch x86_64". The system headers properly handle the data 
size 
differences, but projects which depend upon configure's evaluation of data 
sizes 
instead of system headers such as <stdint.h> are often bit by this. The problem 
is 
exacerbated by configure's test to determine if it is cross-compiling; since 
Mac OS X 
can build and run both i386 and x86_64, configure ignores the cross-compilation 
directive and determines the results from the runtime.

I will post more once I get a feeling for how pervasive the changes may be.

------------------------------------------------------------------------
[2010-10-27 16:11:47] johizzle at gmail dot com

I found that recompiling it with --enable-debug fixed the issue of the 
mysql_fetch_array($var,MYSQL_ASSOC); causing a segmentation fault(11).

It's also good to note, that I installed mysql-client-community rpm, as well.

RHEL 4.8 
Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.7a PHP/5.3.3

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


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

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


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

Reply via email to