php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40841 #38770/#40543 Not fixed on Solaris 10
Submitted: 2007-03-17 04:23 UTC Modified: 2007-04-04 00:36 UTC
Votes:2
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: lovan at lifesci dot ucsb dot edu Assigned: iliaa (profile)
Status: Closed Package: Unknown/Other Function
PHP Version: 5.2.1 OS: Solaris 10
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: lovan at lifesci dot ucsb dot edu
New email:
PHP Version: OS:

 

 [2007-03-17 04:23 UTC] lovan at lifesci dot ucsb dot edu
Description:
------------
A "gmake install" fails with unpack errors when PHP is compiled as a 64-bit module for Apache 2.2.4 and 2.2.3 running on Solaris 10 (sparc).  I've tried three different compilers (GCC 3.4.3 and 4.1.1 and SunPro CC) and get the same result so it seems unlikely to be a compiler problem.

The problem does *not* appear in PHP 5.1.6 but is evident in both 5.2.1 and the 20070316 5.2 snapshot.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-03-17 10:11 UTC] tony2001@php.net
Please use GCC 4.1.2.
 [2007-03-18 00:30 UTC] lovan at lifesci dot ucsb dot edu
Upgrade to GCC 4.1.2 does *not* resolve the issue.  The issue tracks across compilers (now four of them).  Something in the codebase changed between 5.1.6 and 5.2.1 (I haven't tried the intermediate releases) fouling up the compile of a 64-bit binary.


Here is a sample of the error set from PHP 5.2.1 compiled under gcc 4.1.2:
-------------

Warning: unpack(): Type V: not enough input, need 4, have 0 in /home/stf/lovan/build/php-5.2.1/pear/install-pear-nozlib.phar on line 376

Warning: array_values(): The argument should be an array in /home/stf/lovan/build/php-5.2.1/pear/install-pear-nozlib.phar on line 376

Notice: Undefined offset:  2 in /home/stf/lovan/build/php-5.2.1/pear/install-pear-nozlib.phar on line 379

Fatal error: Error: "index.php" is not a file in phar "" in /home/stf/lovan/build/php-5.2.1/pear/install-pear-nozlib.phar on line 411
 [2007-03-19 19:17 UTC] lovan at lifesci dot ucsb dot edu
Update: I tried compiling 5.2.0 to see if I could narrow the problem.

First I compiled it using GCC 4.1.2 (CFLAGS="-m64 -mcpu=v9").  When this binary attempted to unpack the phar archives, it segfaulted.

I then compiled it using SunPro CC (CFLAGS="-xtarget=ultra -xarch=v9b -xcode=pic32").  This compiled and installed cleanly though it fails many more pieces of a "make test".
 [2007-03-20 14:57 UTC] cellog@php.net
so you are saying that PHP 5.2.0 worked fine on Solaris 10, but PHP 
5.2.1 doesn't?  The phar did not change between PHP 5.2.0 and PHP 
5.2.1.

That sounds like a regression in unpack(), not a phar issue.

Changing to feedback to confirm that I understand the user's last 
comment, and re-assigning to tony, with the assumption that it is an 
unpack() regression
 [2007-03-20 16:41 UTC] lovan at lifesci dot ucsb dot edu
I'm saying that the 5.2.0 unpack core dumped under GCC 4.1.2 on Solaris 10 but worked on Solaris 10 if compiled using the Sun C compiler.

I'm also saying that the 5.2.1 unpack reports spurious errors instead of core dumping (regardless of compiler) on Solaris 10.
 [2007-03-30 01:32 UTC] brian at eng dot wayne dot edu
I'm seeing the same error message on SGI IRIX 6.5/64-bit using the commercial IRIX MIPSPro C compiler.
 [2007-03-30 01:35 UTC] brian at eng dot wayne dot edu
Sorry, I should have said - not exactly the same but similar:


Warning: unpack(): Type V: not enough input, need 4, have 0 in /usr/people/brian
/php5.2-200703280830/pear/install-pear-nozlib.phar on line 290

Warning: unpack(): Type V: not enough input, need 4, have 0 in /usr/people/brian
/php5.2-200703280830/pear/install-pear-nozlib.phar on line 302

Warning: array_values(): The argument should be an array in /usr/people/brian/ph
p5.2-200703280830/pear/install-pear-nozlib.phar on line 302

Notice: Undefined offset:  5 in /usr/people/brian/php5.2-200703280830/pear/insta
ll-pear-nozlib.phar on line 304

Notice: Undefined offset:  2 in /usr/people/brian/php5.2-200703280830/pear/insta
ll-pear-nozlib.phar on line 311

Notice: Undefined offset:  5 in /usr/people/brian/php5.2-200703280830/pear/insta
ll-pear-nozlib.phar on line 312

Fatal error: Error: "index.php" is not a file in phar "install-pear-nozlib.phar"
 in /usr/people/brian/php5.2-200703280830/pear/install-pear-nozlib.phar on line
543
 [2007-04-03 22:00 UTC] iliaa@php.net
Please try using this CVS snapshot:

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


 [2007-04-03 23:02 UTC] lovan at lifesci dot ucsb dot edu
CVS snapshot 200704032230 is successful in unpacking the PEAR archive file.
 [2007-04-04 00:36 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC