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

Oh, so which one of these two segfaults do you actualy encounter?
One of them doesn't look to be ODBC related and another one seem to be
caused by your database, which for some reason returns lengths == 62
and value == NULL (which is most likely a bug in the MaxDB ODBC
driver).


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

[2006-12-06 18:34:20] tobias dot barth at web-arts dot com

okay, I will create a test script. in the meantime - perhaps this trace
could help?

---Type <return> to continue, or q <return> to quit---
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47707950089888 (LWP 29782)]
_efree (ptr=0x640000003c) at
/usr/src/php4-STABLE-200612061330/Zend/zend_alloc.c:256
256             CALCULATE_REAL_SIZE_AND_CACHE_INDEX(p->size);
(gdb) bt
#0  _efree (ptr=0x640000003c) at
/usr/src/php4-STABLE-200612061330/Zend/zend_alloc.c:256
#1  0x00002b63e17b0463 in _free_odbc_result (rsrc=<value optimized
out>) at /usr/src/php4-STABLE-200612061330/ext/odbc/php_odbc.c:173
#2  0x00002b63e1869efe in list_entry_destructor (ptr=<value optimized
out>) at /usr/src/php4-STABLE-200612061330/Zend/zend_list.c:177
#3  0x00002b63e186983a in zend_hash_del_key_or_index
(ht=0x2b63e19faaa8, arKey=0x0, nKeyLength=0, h=12, flag=<value
optimized out>)
    at /usr/src/php4-STABLE-200612061330/Zend/zend_hash.c:529
#4  0x00002b63e186a107 in _zend_list_delete (id=<value optimized out>)
at /usr/src/php4-STABLE-200612061330/Zend/zend_list.c:56
#5  0x00002b63e1870c08 in zend_assign_to_variable
(result=0x555555c63288, op1=<value optimized out>, op2=0x555555c632c8,
value=0x555555bfea08,
    type=0, Ts=0x7fffccb7aa00) at
/usr/src/php4-STABLE-200612061330/Zend/zend_execute.c:483
#6  0x00002b63e187677c in execute (op_array=0x555555c04f38) at
/usr/src/php4-STABLE-200612061330/Zend/zend_execute.c:1393
#7  0x00002b63e18782a9 in execute (op_array=0x555555b651c0) at
/usr/src/php4-STABLE-200612061330/Zend/zend_execute.c:2278
#8  0x00002b63e1876249 in execute (op_array=0x555555b256c8) at
/usr/src/php4-STABLE-200612061330/Zend/zend_execute.c:1725
#9  0x00002b63e18782a9 in execute (op_array=0x555555b20ef8) at
/usr/src/php4-STABLE-200612061330/Zend/zend_execute.c:2278
#10 0x00002b63e1862a9a in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /usr/src/php4-STABLE-200612061330/Zend/zend.c:935
#11 0x00002b63e18344b7 in php_execute_script
(primary_file=0x7fffccb995d0) at
/usr/src/php4-STABLE-200612061330/main/main.c:1752
#12 0x00002b63e188083d in php_handler (r=0x555555b0d0a8) at
/usr/src/php4-STABLE-200612061330/sapi/apache2handler/sapi_apache2.c:581
#13 0x000055555558c6ba in ap_run_handler () from
/usr/sbin/httpd2-prefork
#14 0x000055555558faa2 in ap_invoke_handler () from
/usr/sbin/httpd2-prefork
#15 0x000055555559a1c8 in ap_process_request () from
/usr/sbin/httpd2-prefork
#16 0x0000555555597409 in ap_register_input_filter () from
/usr/sbin/httpd2-prefork
#17 0x0000555555593772 in ap_run_process_connection () from
/usr/sbin/httpd2-prefork
#18 0x000055555559dc09 in ap_graceful_stop_signalled () from
/usr/sbin/httpd2-prefork
#19 0x000055555559de0e in ap_graceful_stop_signalled () from
/usr/sbin/httpd2-prefork
#20 0x000055555559e911 in ap_mpm_run () from /usr/sbin/httpd2-prefork
#21 0x0000555555579cb8 in main () from /usr/sbin/httpd2-prefork
(gdb) quit

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

[2006-12-06 17:36:33] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

I believe you don't need a database to reproduce the last one.

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

[2006-12-06 17:29:41] tobias dot barth at web-arts dot com

The first call to the php script now finished without crash, but the
next one made the folloing back trace:

---Type <return> to continue, or q <return> to quit---
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47766558578336 (LWP 14425)]
virtual_file_ex (state=0x7fff27625060, path=0x7fff27623010
"/home/votum/www/admin/pressestimmen.cfg", verify_path=0,
use_realpath=1)
    at /usr/src/php4-STABLE-200612061330/TSRM/tsrm_virtual_cwd.c:380
380                     state->cwd[copy_amount] = '\0';
(gdb) bt
#0  virtual_file_ex (state=0x7fff27625060, path=0x7fff27623010
"/home/votum/www/admin/pressestimmen.cfg", verify_path=0,
use_realpath=1)
    at /usr/src/php4-STABLE-200612061330/TSRM/tsrm_virtual_cwd.c:380
#1  0x00002b7186da34a8 in expand_filepath (filepath=0x555555b27ab8
"pressestimmen.cfg", real_path=0x0)
    at /usr/src/php4-STABLE-200612061330/main/fopen_wrappers.c:525
#2  0x00002b7186dad262 in _php_stream_fopen (filename=0x555555b27ab8
"pressestimmen.cfg", mode=0x555555b8bbf8 "r", opened_path=0x0,
options=4)
    at /usr/src/php4-STABLE-200612061330/main/streams.c:1968
#3  0x00002b7186dacde5 in _php_stream_open_wrapper_ex
(path=0x555555b27ab8 "pressestimmen.cfg", mode=0x555555b8bbf8 "r",
options=4,
    opened_path=0x0, context=0x0) at
/usr/src/php4-STABLE-200612061330/main/streams.c:2696
#4  0x00002b7186d47e75 in php_if_fopen (ht=<value optimized out>,
return_value=0x555555c028f8, this_ptr=<value optimized out>,
    return_value_used=<value optimized out>) at
/usr/src/php4-STABLE-200612061330/ext/standard/file.c:1148
#5  0x00002b7186de51ce in execute (op_array=0x555555b72c50) at
/usr/src/php4-STABLE-200612061330/Zend/zend_execute.c:1681
#6  0x00002b7186ddf249 in execute (op_array=0x555555b75ac0) at
/usr/src/php4-STABLE-200612061330/Zend/zend_execute.c:1725
#7  0x00002b7186ddf249 in execute (op_array=0x555555be7118) at
/usr/src/php4-STABLE-200612061330/Zend/zend_execute.c:1725
#8  0x00002b7186de12a9 in execute (op_array=0x555555b22fd8) at
/usr/src/php4-STABLE-200612061330/Zend/zend_execute.c:2278
#9  0x00002b7186dcba9a in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /usr/src/php4-STABLE-200612061330/Zend/zend.c:935
#10 0x00002b7186d9d4b7 in php_execute_script
(primary_file=0x7fff27632060) at
/usr/src/php4-STABLE-200612061330/main/main.c:1752
#11 0x00002b7186de983d in php_handler (r=0x555555b13a58) at
/usr/src/php4-STABLE-200612061330/sapi/apache2handler/sapi_apache2.c:581
#12 0x000055555558c6ba in ap_run_handler () from
/usr/sbin/httpd2-prefork
#13 0x000055555558faa2 in ap_invoke_handler () from
/usr/sbin/httpd2-prefork
#14 0x000055555559a1c8 in ap_process_request () from
/usr/sbin/httpd2-prefork
#15 0x0000555555597409 in ap_register_input_filter () from
/usr/sbin/httpd2-prefork
#16 0x0000555555593772 in ap_run_process_connection () from
/usr/sbin/httpd2-prefork
#17 0x000055555559dc09 in ap_graceful_stop_signalled () from
/usr/sbin/httpd2-prefork
#18 0x000055555559de0e in ap_graceful_stop_signalled () from
/usr/sbin/httpd2-prefork
#19 0x000055555559e911 in ap_mpm_run () from /usr/sbin/httpd2-prefork
#20 0x0000555555579cb8 in main () from /usr/sbin/httpd2-prefork

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

[2006-12-06 17:20:02] [EMAIL PROTECTED]

Ok, I updated the patch. Try again please.

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

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

tried that patch and got again a crash, but with another backtrace:


---Type <return> to continue, or q <return> to quit---
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47383497090720 (LWP 31475)]
0x00002b18540a0122 in memcpy () from /lib64/libc.so.6
(gdb) bt
#0  0x00002b18540a0122 in memcpy () from /lib64/libc.so.6
#1  0x0000555555c125e8 in ?? ()
#2  0x00002b18569d5132 in _estrndup (s=0x0, length=62) at
/usr/src/php4-STABLE-200612061330/Zend/zend_alloc.c:409
#3  0x00002b1856934947 in zif_odbc_fetch_into (ht=<value optimized
out>, return_value=0x555555c12388, this_ptr=<value optimized out>,
    return_value_used=<value optimized out>) at
/usr/src/php4-STABLE-200612061330/ext/odbc/php_odbc.c:1618
#4  0x00002b18569fe16e in execute (op_array=0x555555c07dd8) at
/usr/src/php4-STABLE-200612061330/Zend/zend_execute.c:1681
#5  0x00002b18569fa249 in execute (op_array=0x555555b6e780) at
/usr/src/php4-STABLE-200612061330/Zend/zend_execute.c:2278
#6  0x00002b18569f81e9 in execute (op_array=0x555555b30bc8) at
/usr/src/php4-STABLE-200612061330/Zend/zend_execute.c:1725
#7  0x00002b18569fa249 in execute (op_array=0x555555b2c468) at
/usr/src/php4-STABLE-200612061330/Zend/zend_execute.c:2278
#8  0x00002b18569e4a3a in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /usr/src/php4-STABLE-200612061330/Zend/zend.c:935
#9  0x00002b18569b6457 in php_execute_script
(primary_file=0x7fff57a19440) at
/usr/src/php4-STABLE-200612061330/main/main.c:1752
#10 0x00002b1856a027dd in php_handler (r=0x555555b114d8) 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)

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

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/39756

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

Reply via email to