#28372 [Opn->NoF]: Seg Fault when using mhash
| From: | iliaa@php.net | Date: | Wed, 12 May 2004 16:50:27 +0000 |
| Subject: | #28372 [Opn->NoF]: Seg Fault when using mhash | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-59544@lists.php.net to get a copy of this message | ||
ID: 28372
Updated by: iliaa@php.net
Reported By: adrian at psoft dot biz
-Status: Open
+Status: No Feedback
Bug Type: mhash related
Operating System: RHEL ES 3
PHP Version: 4.3.6
New Comment:
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
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.
cannot reproduce here, could you please generate a
backtrace of the crash.
Previous Comments:
------------------------------------------------------------------------
[2004-05-12 17:27:18] adrian at psoft dot biz
Description:
------------
Apache child seg faults when calling the mhash() function from a PHP
script.
PHP 4.3.6, 4.3.5, 4.2.2
mhash 0.8.18 and 0.9.1
If I enable debug mode to generate a backtrace it doesn't seg fault,
but the script below gives 000...0000 as a result, so I generated the
backgrace without debug enabled.
This works using the php binary, just seg faults when called from
within apache.
Reproduce code:
---------------
<?php
$str = "test string!";
echo bin2hex(mhash(MHASH_MD5, $str));
?>
Expected result:
----------------
[root@server httpdocs]# php -q mhash.php
cff1fa7b32de5979c35874350570dd74
Actual result:
--------------
#0 0xb719ecd9 in _int_free () from /lib/tls/libc.so.6
#1 0xb719dc88 in free () from /lib/tls/libc.so.6
#2 0xb6544171 in mhash_deinit (td=0xb7262720, result=0x839d948) at
mhash.c:366
#3 0xb65441d3 in mhash_end_m (td=0x839d8e8, hash_malloc=0xb719da80
<malloc>) at mhash.c:384
#4 0xb6544201 in mhash_end (td=0x839d8c0) at mhash.c:391
#5 0xb65623a8 in zif_mhash () from /usr/lib/php4/mhash.so
#6 0xb6e0e788 in execute () from /etc/httpd/modules/libphp4.so
#7 0xb6dffe76 in zend_execute_scripts () from
/etc/httpd/modules/libphp4.so
#8 0xb6dd46b4 in php_execute_script () from
/etc/httpd/modules/libphp4.so
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28372&edit=1