php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32794 install-pear.php segfaults (ZE2 bug)
Submitted: 2005-04-21 23:02 UTC Modified: 2005-04-24 19:49 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: benjcarson at digitaljunkies dot ca Assigned: helly (profile)
Status: Closed Package: Reproducible crash
PHP Version: 5CVS-2005-04-21 (dev) OS: *
Private report: No CVE-ID: None
 [2005-04-21 23:02 UTC] benjcarson at digitaljunkies dot ca
Description:
------------
The latest (2005-04-21) CVS HEAD and snaps are segfaulting while executing install-pear.php during make install.  Here's a backtrace:

#0  0x407b8e84 in mallopt () from /lib/tls/libc.so.6
#1  0x407b7dcb in free () from /lib/tls/libc.so.6
#2  0x0818a692 in _efree (ptr=0x832951c) at /usr/src/php5-200504211030/Zend/zend_alloc.c:308
#3  0x081a4f38 in zend_hash_destroy (ht=0x83c1b50) at /usr/src/php5-200504211030/Zend/zend_hash.c:519
#4  0x081977b7 in destroy_zend_class (pce=0x10652d38) at /usr/src/php5-200504211030/Zend/zend_opcode.c:161
#5  0x081a4e16 in zend_hash_del_key_or_index (ht=0x826f3d8, arKey=0x84e0390 "pear_registry", nKeyLength=14, h=3284853093,
    flag=0) at /usr/src/php5-200504211030/Zend/zend_hash.c:490
#6  0x081a540d in zend_hash_reverse_apply (ht=0x826f3d8, apply_func=0x8193f20 <is_not_internal_class>)
    at /usr/src/php5-200504211030/Zend/zend_hash.c:736
#7  0x0819461c in shutdown_executor () at /usr/src/php5-200504211030/Zend/zend_execute_API.c:264
#8  0x0819e6d5 in zend_deactivate () at /usr/src/php5-200504211030/Zend/zend.c:823
#9  0x08166db6 in php_request_shutdown (dummy=0x0) at /usr/src/php5-200504211030/main/main.c:1217
#10 0x0820ecc0 in main (argc=2, argv=0xbffffa04) at /usr/src/php5-200504211030/sapi/cli/php_cli.c:1057


I've tried to narrow down the test case a little bit, see the reproduce code below.

Reproduce code:
---------------
<?php
// Put this file in php-src/pear/

include "PEAR.php";

class Foo extends PEAR { }

?>

Expected result:
----------------
[no output]

Actual result:
--------------
Segmentation Fault

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-24 02:16 UTC] tony2001@php.net
Assigning to Marcus, he broke it.

See the patch below:

Index: zend_compile.c
===================================================================
RCS file: /repository/ZendEngine2/zend_compile.c,v
retrieving revision 1.618
diff -u -p -d -r1.618 zend_compile.c
--- zend_compile.c      19 Apr 2005 22:04:57 -0000      1.618
+++ zend_compile.c      24 Apr 2005 00:14:24 -0000
@@ -42,6 +42,7 @@ ZEND_API zend_executor_globals executor_
 static void zend_duplicate_property_info(zend_property_info *property_info)
 {
        property_info->name = estrndup(property_info->name, property_info->name_length);
+       property_info->doc_comment = estrndup(property_info->doc_comment, property_info->doc_comment_len);
 }

 [2005-04-24 19:40 UTC] tony2001@php.net
Please try using this CVS snapshot:

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


 [2005-04-24 19:49 UTC] tony2001@php.net
Erm. Clicked wrong link.
I meant it's fixed in CVS.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 21:01:29 2024 UTC