|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-04-17 17:16 UTC] joe at creativeanvil dot com
Description:
------------
Appears that in certain cases when trying to access an array key that does not
exist, apache segfaults.
Test script:
---------------
$this->line_item_array = array('14441454');
foreach($this->line_item_array as $line_num => $line_item) {
if($line_item['pallets'] > 0) {
$pallets = " on {$line_item['pallets']} pallet(s)";
} else {
$pallets = '';
}
$line_num += 1;
$handling_unit = strtolower($line_item['handling_unit']);
$dims = (!empty($line_item['length'])) ? ", {$line_item['length']}x{$line_item['width']}x{$line_item['height']}" : '';
$text .= "{$line_item['pieces']} $handling_unit$pallets$dims\n";
}
Expected result:
----------------
Notices and warnings thrown about non-existent indexes, not a segfault.
Actual result:
--------------
Loaded symbols for /lib64/libkrb5support.so.0
Reading symbols from /lib64/libkeyutils.so.1...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libkeyutils.so.1
Reading symbols from /usr/lib64/apr-util-1/apr_ldap-1.so...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib64/apr-util-1/apr_ldap-1.so
Core was generated by `/usr/sbin/httpd -k start'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007f7683eb9d71 in zend_hash_quick_find (ht=0x7f76912e0f48,
arKey=0x7f768e9a25a0 "handling_unit", nKeyLength=14, h=12662310260902317513,
pData=0x7fffa613be18) at /usr/local/src/php-5.4.0/Zend/zend_hash.c:950
950 p = ht->arBuckets[nIndex];
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 06:00:01 2025 UTC |
I'm seeing this same issue on php 5.4.14, Fedora 17: Core was generated by `/usr/sbin/httpd -k start'. Program terminated with signal 11, Segmentation fault. #0 0x00007fae904dc298 in zend_hash_quick_find (ht=ht@entry=0x7fae9eb26698, arKey=0x7fae9f9d3290 "mbstring", nKeyLength=9, h=h@entry=249897825911322699, pData=pData@entry=0x7fffdc759548) at /usr/src/debug/php- 5.4.14/Zend/zend_hash.c:950 950 p = ht->arBuckets[nIndex]; Packages: httpd-2.2.23-1.fc17.x86_64 php-5.4.14-1.fc17.x86_64 php-common-5.4.14-1.fc17.x86_64 php-imap-5.4.14-1.fc17.x86_64 php-pecl-apc-debuginfo-3.1.15-0.3.svn329913.fc17.x86_64 php-pspell-5.4.14-1.fc17.x86_64 php-debuginfo-5.4.14-1.fc17.x86_64 php-pdo-5.4.14-1.fc17.x86_64 php-mysql-5.4.14-1.fc17.x86_64 php-mbstring-5.4.14-1.fc17.x86_64 php-mcrypt-5.4.14-1.fc17.x86_64 php-pear-1.9.4-7.fc17.2.noarch php-Kohana-2.4-1.rc2.fc17.3.noarch php-cli-5.4.14-1.fc17.x86_64 php-pgsql-5.4.14-1.fc17.x86_64 php-xml-5.4.14-1.fc17.x86_64 php-gd-5.4.14-1.fc17.x86_64 php-pecl-apc-3.1.15-0.3.svn329913.fc17.x86_64 I have not located the source script yet.