php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21593 make install:install-pear-* rules segfault
Submitted: 2003-01-12 03:25 UTC Modified: 2003-10-04 01:24 UTC
Votes:25
Avg. Score:4.6 ± 0.8
Reproduced:22 of 22 (100.0%)
Same Version:7 (31.8%)
Same OS:11 (50.0%)
From: kelledin at users dot sourceforge dot net Assigned:
Status: No Feedback Package: Compile Failure
PHP Version: 4.3.0 OS: *nix
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kelledin at users dot sourceforge dot net
New email:
PHP Version: OS:

 

 [2003-01-12 03:25 UTC] kelledin at users dot sourceforge dot net
PHP compiles and installs fine on x86.  However, on my  
EV56 box, it completes the compile but then segfaults  
during "make install":  
  
Installing shared extensions:      
/var/tmp/php4-4.3.0-1-0-0-build/usr/lib/php/extensions/no-debug-non-zts-20020429/  
Installing PEAR environment:       
/var/tmp/php4-4.3.0-1-0-0-build/usr/lib/php/  
[activating module `php4' in /etc/apache/httpd.conf]  
cp libs/libphp4.so  
/var/tmp/php4-4.3.0-1-0-0-build/usr/lib/apache/libphp4.so  
chmod 755  
/var/tmp/php4-4.3.0-1-0-0-build/usr/lib/apache/libphp4.so  
cp /etc/apache/httpd.conf /etc/apache/httpd.conf.bak  
cp /etc/apache/httpd.conf.new /etc/apache/httpd.conf  
rm /etc/apache/httpd.conf.new  
Installing build environment:      
/var/tmp/php4-4.3.0-1-0-0-build/usr/lib/php/build/  
Installing header files:           
/var/tmp/php4-4.3.0-1-0-0-build/usr/include/php/  
Installing helper programs:        
/var/tmp/php4-4.3.0-1-0-0-build/usr/bin/  
  program: phpize  
  program: php-config  
  program: phpextdist  
make[1]: *** [install-pear-installer] Segmentation fault  
make[1]: *** Waiting for unfinished jobs....  
make[1]: *** [install-pear-packages] Segmentation fault  
make: *** [install-pear] Error 2  
 
And so it ends. 
 
Running the commands through gdb produces the following 
output: 
 
GNU gdb 5.2.1 
Copyright 2002 Free Software Foundation, Inc. 
GDB is free software, covered by the GNU General Public 
License, and you are 
welcome to change it and/or distribute copies of it under 
certain conditions. 
Type "show copying" to see the conditions. 
There is absolutely no warranty for GDB.  Type "show 
warranty" for details. 
This GDB was configured as "alpha-incept-linux-gnu"... 
(gdb) set args 
/usr/src/incept/BUILD/php-4.3.0/pear/install-pear.php 
/usr/src/incept/BUILD/php-4.3.0/pear/package-*.xml 
(gdb) run 
Starting program: 
/usr/src/incept/BUILD/php-4.3.0/sapi/cli/php 
/usr/src/incept/BUILD/php-4.3.0/pear/install-pear.php 
/usr/src/incept/BUILD/php-4.3.0/pear/package-*.xml 
 
Program received signal SIGSEGV, Segmentation fault. 
0x1200fd9c4 in php_strspn ( 
    s1=0x12058b1b8 "This class provides handling of tar 
files in PHP.\nIt supports creating, listing, extracting 
and adding to tar files.\nGzip support is available if PHP 
has the zlib extension built-in or\nloaded.\n", 
s2=0x12058a348 " \t",  
    s1_end=0x22058b279 <Address 0x22058b279 out of 
bounds>,  
    s2_end=0x22058a34a <Address 0x22058a34a out of 
bounds>) 
    at 
/usr/src/incept/BUILD/php-4.3.0/ext/standard/string.c:1305 
1305                            c = *(++p); 
(gdb) backtrace full 
#0  0x1200fd9c4 in php_strspn ( 
    s1=0x12058b1b8 "This class provides handling of tar 
files in PHP.\nIt supports creating, listing, extracting 
and adding to tar files.\nGzip support is available if PHP 
has the zlib extension built-in or\nloaded.\n", 
s2=0x12058a348 " \t",  
    s1_end=0x22058b279 <Address 0x22058b279 out of 
bounds>,  
    s2_end=0x22058a34a <Address 0x22058a34a out of 
bounds>) 
    at 
/usr/src/incept/BUILD/php-4.3.0/ext/standard/string.c:1305 
        p = 0x1205be000 <Address 0x1205be000 out of 
bounds> 
        spanp = 0x12058a34b "ded." 
        c = 0 '\0' 
#1  0x1200f9910 in php_spn_common_handler (ht=2, 
return_value=0x1205570a8,  
    this_ptr=0x22058b279, return_value_used=542679882, 
behavior=0) 
    at 
/usr/src/incept/BUILD/php-4.3.0/ext/standard/string.c:244 
        s11 = 0x12058b1b8 "This class provides handling of 
tar files in PHP.\nIt supports creating, listing, 
extracting and adding to tar files.\nGzip support is 
available if PHP has the zlib extension built-in 
or\nloaded.\n" 
        s22 = 0x12058a348 " \t" 
        len1 = 4294967489 
        len2 = 4294967298 
        start = 0 
        len = 4294967489 
#2  0x12019bdf8 in execute (op_array=0x1204c2c78) 
    at 
/usr/src/incept/BUILD/php-4.3.0/Zend/zend_execute.c:1596 
        execute_data = {opline = 0x1203a7f58, 
function_state = { 
    function_symbol_table = 0x2000080bb40, function = 
0x120270430, reserved = { 
      0x2000080bb40, 0x12058a178, 0xa, 0x120172a7c}}, fbc 
= 0x0, ce = 0x0, object = { 
    ptr = 0x0}, Ts = 0x11ffe8fb0, original_in_execution = 
1 '\001',  
  op_array = 0x1204c2c78, prev_execute_data = 0x11ffed568} 
(gdb) frame 2 
#2  0x12019bdf8 in execute (op_array=0x1204c2c78) 
    at 
/usr/src/incept/BUILD/php-4.3.0/Zend/zend_execute.c:1596 
1596                                                            
((zend_internal_function *) 
EX(function_state).function)->handler(EX(opline)->extended_value, 
EX(Ts)[EX(opline)->result.u.var].var.ptr, EX(object).ptr, 
return_value_used TSRMLS_CC); 
(gdb) 
 
From the stack trace above, I gather that exactly 
0x100000000 is getting added to a couple of php_strspn's 
parameters.  Clearly something isn't quite 64-bit clean, 
but I don't know what's broken.  It could be the 
install-pear.php script, or it could be php itself... 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-10-04 01:24 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 11:01:29 2024 UTC