php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34786 2 @ results in change to error_reporting() to random value
Submitted: 2005-10-08 04:09 UTC Modified: 2005-10-10 12:56 UTC
From: cellog@php.net Assigned: tony2001 (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 5CVS-2005-10-08 (CVS) OS: linux (gentoo)
Private report: No CVE-ID: None
 [2005-10-08 04:09 UTC] cellog@php.net
Description:
------------
This is a critical bug in PHP 5.1 (PHP_5_1) latest CVS.

running "make install-pear" results in all kinds of E_STRICT warnings.  This is in spite of an explicit -derror_reporting=E_ALL

I traced the problem using var_dump(error_reporting()); peppered throughout the source of install-pear.phar to a single line located in cvs at pear-core/Archive/Tar.php on line 706:

@fseek($this->_file, @ftell($this->_file)+($p_len*512));

removing the second @ in front of ftell() fixes the problem.

Reproduce code:
---------------
make install-pear.phar

use http://pear.php.net/~greg/install-pear.phar for a debug .phar that has inserted a few var_dump(error_reporting()); around the offending line.  int(2047) is E_ALL, and after the line, there are 2 var_dump(error_reporting()) that spit out random integers, ranging from 10 to numbers like 14803908 to -14378917.

A valgrind trace is at:

http://pear.php.net/~greg/pearcrash.txt

Expected result:
----------------
works with no warnings

Actual result:
--------------
install works sometimes, but there are lots of E_STRICT warnings.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-08 14:22 UTC] sniper@php.net
Assigned to the engine expert. :)


 [2005-10-10 12:56 UTC] dmitry@php.net
Fixed in CVS HEAD and PHP_5_1.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 08:01:29 2024 UTC