ID:               39756
 User updated by:  tobias dot barth at web-arts dot com
 Reported By:      tobias dot barth at web-arts dot com
-Status:           Feedback
+Status:           Open
 Bug Type:         ODBC related
 Operating System: SuSE Linux 10.1
 PHP Version:      4.4.4
 New Comment:

lxdevel:~/wwwrun # gdb /usr/sbin/httpd2-prefork
GNU gdb 6.4
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "x86_64-suse-linux"...(no debugging symbols
found)
Using host libthread_db library "/lib64/libthread_db.so.1".

(gdb) run -X -f /etc/apache2_sit_PHP4/httpd.conf -DSSL
Starting program: /usr/sbin/httpd2-prefork -X -f
/etc/apache2_sit_PHP4/httpd.conf -DSSL
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 47155217888928 (LWP 21768)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)

---Type <return> to continue, or q <return> to quit---
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47155217888928 (LWP 21768)]
0x00002ae32d89d122 in memcpy () from /lib64/libc.so.6
(gdb) bt
#0  0x00002ae32d89d122 in memcpy () from /lib64/libc.so.6
#1  0x0000555555c010b8 in ?? ()
#2  0x00002ae3301d2132 in _estrndup (s=0x0, length=62) at
/usr/src/php4-STABLE-200612061330/Zend/zend_alloc.c:409
#3  0x00002ae3301313fe in zif_odbc_result (ht=<value optimized out>,
return_value=0x555555c0eec8, this_ptr=<value optimized out>,
    return_value_used=<value optimized out>) at
/usr/src/php4-STABLE-200612061330/ext/odbc/php_odbc.c:1854
#4  0x00002ae3301fb16e in execute (op_array=0x555555b1c4c8) at
/usr/src/php4-STABLE-200612061330/Zend/zend_execute.c:1681
#5  0x00002ae3301f7249 in execute (op_array=0x555555b647d0) at
/usr/src/php4-STABLE-200612061330/Zend/zend_execute.c:2278
#6  0x00002ae3301f51e9 in execute (op_array=0x555555b24c48) at
/usr/src/php4-STABLE-200612061330/Zend/zend_execute.c:1725
#7  0x00002ae3301f7249 in execute (op_array=0x555555b204e8) at
/usr/src/php4-STABLE-200612061330/Zend/zend_execute.c:2278
#8  0x00002ae3301e1a3a in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /usr/src/php4-STABLE-200612061330/Zend/zend.c:935
#9  0x00002ae3301b3457 in php_execute_script
(primary_file=0x7fff7e219c50) at
/usr/src/php4-STABLE-200612061330/main/main.c:1752
#10 0x00002ae3301ff7dd in php_handler (r=0x555555b0d0a8) at
/usr/src/php4-STABLE-200612061330/sapi/apache2handler/sapi_apache2.c:581
#11 0x000055555558c6ba in ap_run_handler () from
/usr/sbin/httpd2-prefork
#12 0x000055555558faa2 in ap_invoke_handler () from
/usr/sbin/httpd2-prefork
#13 0x000055555559a1c8 in ap_process_request () from
/usr/sbin/httpd2-prefork
#14 0x0000555555597409 in ap_register_input_filter () from
/usr/sbin/httpd2-prefork
#15 0x0000555555593772 in ap_run_process_connection () from
/usr/sbin/httpd2-prefork
#16 0x000055555559dc09 in ap_graceful_stop_signalled () from
/usr/sbin/httpd2-prefork
#17 0x000055555559de0e in ap_graceful_stop_signalled () from
/usr/sbin/httpd2-prefork
#18 0x000055555559e911 in ap_mpm_run () from /usr/sbin/httpd2-prefork
#19 0x0000555555579cb8 in main () from /usr/sbin/httpd2-prefork
(gdb)


Previous Comments:
------------------------------------------------------------------------

[2006-12-06 15:55:16] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.



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

[2006-12-06 15:44:27] tobias dot barth at web-arts dot com

tried it, and got the same result as before.

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

[2006-12-06 15:27:23] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip



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

[2006-12-06 15:16:22] tobias dot barth at web-arts dot com

Description:
------------
I got SuSE 10.1, a self-compiled php 4.4.4 (also tried the
php5-5.1.2-29.22 from SuSE and php 5.1.4 from the php website with the
same result), unixODBC, apache 2.2 and MaxDB 7.6 on an AMD X2 x86_64
platform with the following table:

CREATE TABLE "PRESSESTIMMEN"
(
        "ID"               Fixed (18,0)    NOT NULL,
        "TITLE"               Varchar (100) ASCII,
        "HEADLINE"               Varchar (250) ASCII,
        "DATUM"               Date,
        "TEXT"               Long ASCII,
        "BILD_NAME"               Varchar (100) ASCII,
        "BILD_TYPE"               Varchar (120) ASCII,
        "BILD_SIZE"               Fixed (18,0),
        "BILD"               Char (2) ASCII,
        "ARCHIVDATUM"               Date,
        PRIMARY KEY ("ID")
)

doing a 

$a = odbc_exec ($dbcon, select id,title,headline,datum from
pressestimmen");
while (odbc_fetch_into ($a, $row)) {
...
}

works well. But if I modify the select statement:

$a = odbc_exec ($dbcon, select * from pressestimmen");

only reads out the first line. The second call to "odbc_fetch_into"
crashes. in the error_log of apache, I see 
*** glibc detected *** /usr/sbin/httpd2-prefork: free(): invalid
pointer: 0x0000
555555c2df40 ***

If I modify the select statement to
    $a = odbc_exec ($dbcon, "select id,title,headline,datum,text from
pressestimmen");

I get the same problems. I think it is because of the data type "long
ascii" of the "text" column. I had this software running on php3 and
php4 since the days of SuSE 7.0 on 32 bit platforms until SuSE 10.0 and
SuSE 10.1 on a dual XEON 32 bit platform without problems, but now on
the 64 bit machine, it crashes. So I think, it is an 64 Bit problem
with the Long Ascii data type.



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


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

Reply via email to