PHP 4.0 Bug #3249: split function causes emalloc error
| From: | shane at bratnet dot net | Date: | Wed, 19 Jan 2000 01:01:07 +0000 |
| Subject: | PHP 4.0 Bug #3249: split function causes emalloc error | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-14748@lists.php.net to get a copy of this message | ||
From: shane@bratnet.net
Operating system: Solaris 2.6
PHP version: 4.0 Beta 3
PHP Bug Type: Reproduceable crash
Bug description: split function causes emalloc error
<?
print "<PRE> This is a test</PRE>\n";
// Explode works
$str="unix:ver0";
$parts=explode(":",$str);
print "Part1: $parts[0] Part2: $parts[1]\n";
// Split Does Not
$parts2=split(":",$str);
?>
Note: If I use explode, it works, split which is almost identical dosent work.
Backtrace from DBX
(dbx) where
[1] _kill(0x0, 0xb, 0xeefaaa1c, 0x4, 0xeefa3138, 0xcad40), at 0xeef88244
=>[2] _emalloc(size = 4026443849U, __zend_filename = 0x2c790c "zend_API.c",
__zend_lineno = 455U, __zend_orig_filename = (nil), __zend_orig_lineno = 0), line 128 in
"zend_alloc.c"
[3] _estrndup(s = 0x6a2710 "unix:ver0", length = 4026443848U, __zend_filename = 0x2c790c
"zend_API.c", __zend_lineno = 455U, __zend_orig_filename = (nil), __zend_orig_lineno = 0),
line 269 in "zend_alloc.c"
[4] add_next_index_stringl(arg = 0xefff2948, str = 0x6a2710 "unix:ver0", length =
4026443848U, duplicate = 1), line 455 in "zend_API.c"
[5] php3_split(ht = 2, return_value = 0xefff2948, list = 0x2e9904, plist = 0x2e9930, this_ptr =
(nil)), line 577 in "reg.c"
[6] execute(op_array = 0x34a8a8), line 1471 in "zend_execute.c"
[7] php_execute_script(primary_file = 0xeffff6e8), line 1199 in "main.c"
[8] apache_php_module_main(r = 0x346458, fd = 27, display_source_mode = 0), line 87 in
"sapi_apache.c"
[9] send_php(0x346458, 0x0, 0x3481e0, 0x7efefeff, 0x0, 0x0), at 0xbe36c
[10] send_parsed_php(0x346458, 0x27cb6b, 0xffffffff, 0x0, 0x70, 0x70), at 0xbe3c8
[11] ap_invoke_handler(0x346458, 0xeefd0000, 0x0, 0x0, 0x16, 0x16), at 0x1b1994
[12] process_request_internal(0x346458, 0x1, 0x40, 0xef70087c, 0x4, 0x1), at 0x1ccbd8
[13] ap_process_request(0x346458, 0x4, 0x346458, 0xeffff99c, 0xeffff9ac, 0x0), at 0x1ccc70
[14] child_main(0x0, 0x1bf630, 0x0, 0x0, 0x0, 0x0), at 0x1c1468
[15] make_child(0x2eddc8, 0x0, 0x38850725, 0xeefa5a2c, 0x40, 0x0), at 0x1c16d0
[16] startup_children(0x19, 0x2eddc8, 0x2c1608, 0x0, 0x2f6f7074, 0x6c6f6773), at 0x1c1890
[17] standalone_main(0x3, 0xeffffc0c, 0x2c1608, 0x44, 0xeefa5c70, 0xeefa5efc), at 0x1c210c
[18] main(0x3, 0xeffffc0c, 0xeffffc1c, 0x2a7800, 0x0, 0x0), at 0x1c2c8c
(dbx)
Other Stuff to make your head gooey.
cc: WorkShop Compilers 5.0 98/12/15 C 5.0
usage: cc [ options] files. Use 'cc -flags' for details
SunOS xxxxxxxx 5.6 Generic_105181-15 sun4u sparc SUNW,Ultra-250
[xxxxxxxxx] /opt/apache/bin % ./httpsd -v
Server version: Apache/1.3.9 (Unix)
Server built: Jan 18 2000 17:52:03
php configure line:./configure --with-oracle --with-gd=shared,/usr/local
--with-apache=../apache_1.3.9-eapi --with-gdbm=/opt/gnu --with-zlib=/usr/local
Apache Version 1.3.9 With Raven SSL Comercial Version.