Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89872 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99477 invoked from network); 22 Dec 2015 17:36:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Dec 2015 17:36:06 -0000 Authentication-Results: pb1.pair.com smtp.mail=php_lists@realplain.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php_lists@realplain.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain realplain.com from 68.114.190.28 cause and error) X-PHP-List-Original-Sender: php_lists@realplain.com X-Host-Fingerprint: 68.114.190.28 mtaout003-public.msg.strl.va.charter.net Received: from [68.114.190.28] ([68.114.190.28:26280] helo=mtaout003-public.msg.strl.va.charter.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4A/2F-51216-40A89765 for ; Tue, 22 Dec 2015 12:36:05 -0500 Received: from impout002 ([68.114.189.17]) by mtaout003.msg.strl.va.charter.net (InterMail vM.9.00.021.00 201-2473-182) with ESMTP id <20151222173601.ZTDF22826.mtaout003.msg.strl.va.charter.net@impout002>; Tue, 22 Dec 2015 11:36:01 -0600 Received: from pc1 ([97.87.188.16]) by impout002 with charter.net id whc01r00L0Mfu3D01hc0ES; Tue, 22 Dec 2015 11:36:01 -0600 X-Authority-Analysis: v=2.1 cv=Y5B2s3uN c=1 sm=1 tr=0 a=Ay788ph35uAhBIV2K373vw==:117 a=Ay788ph35uAhBIV2K373vw==:17 a=hOpmn2quAAAA:8 a=BCPeO_TGAAAA:8 a=N659UExz7-8A:10 a=UNoSYATMAAAA:8 a=xNRjGzMZAAAA:8 a=G_f4OkPkB3VIZDBiPI4A:9 a=FHZIRfXbJdeTKONr:21 a=r7J-D91I3WJTV-n9:21 a=pILNOxqGKmIA:10 a=sxcw1MezencA:10 a=7oP8q2KDPmgA:10 a=8EqRGK6IFhsA:10 a=-FEs8UIgK8oA:10 a=qiWi7Edwir4A:10 a=NWVoK91CQyQA:10 a=8HCqPieFP7UA:10 Message-ID: <4342ECED904143CD9AC7AA35F2F1481B@pc1> To: "PHP internals list" , "Lior Kaplan" , "Dmitry Stogov" Cc: "Andrea Faulds" References: <8E.46.23339.4FA22565@pb1.pair.com> Date: Tue, 22 Dec 2015 11:36:00 -0600 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Subject: Mysterious crashes (WAS: Re: Pear fetch script problem on PHP 7.0) From: php_lists@realplain.com ("Matt Wilmas") Hi all, Lior, which compiler are you using? You can still reproduce the problem? Can you run it through Valgrind? I'm getting random crashes I can't figure out on 64-bit Linux after just making a very trivial change. :-/ The backtrace is the same up to compile_file() (although maybe that doesn't mean much? hmm). Dmitry, to reproduce, just add another GLOBAL REGISTER variable to zend_vm_execute, and then set it in execute_ex(). An empty file will crash it. It does NOT crash with --enable-debug, nor with certain combinations of optimization level and global register. %r12 with -O2 seems to consistently fail, but with -O3 it might be %r13, etc. Now, the question: Is that little change triggering a bug in GCC 4.8? Or is it somehow revealing a PHP problem?! Thanks, Matt ----- Original Message ----- From: "Lior Kaplan" Sent: Monday, November 23, 2015 > Hi, > > Thanks Ferenc for checking. > > trying to debug this, I've added "echo var_dump($argv);" in the begining > of > the script, but now it segfault. > > before: > sh-3.2# /php-7.0.0RC7/sapi/cli/php -n /php-7.0.0RC7/pear/fetch.php " > http://5.77.39.20/install-pear-nozlib.phar" pear/install-pear-nozlib.phar > > Fatal error: Redefinition of parameter $argv in > /php-7.0.0RC7/pear/fetch.php on line 3 > sh-3.2# /php-7.0.0RC7/sapi/cli/php -n -m > [PHP Modules] > Core > date > dom > filter > hash > iconv > json > libxml > mysqlnd > openssl > pcre > PDO > pdo_mysql > pdo_pgsql > pdo_sqlite > readline > Reflection > session > SimpleXML > SPL > sqlite3 > standard > xml > xmlreader > xmlwriter > zlib > > [Zend Modules] > > after: > > (gdb) r -n /php-7.0.0RC7/pear/fetch.php " > http://5.77.39.20/install-pear-nozlib.phar" pear/install-pear-nozlib.phar > Starting program: /php-7.0.0RC7/sapi/cli/php -n > /php-7.0.0RC7/pear/fetch.php "http://5.77.39.20/install-pear-nozlib.phar" > pear/install-pear-nozlib.phar > Reading symbols for shared libraries > ++++++................................................ done > Reading symbols for shared libraries ........................ done > > Program received signal EXC_BAD_ACCESS, Could not access memory. > Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000010 > zend_try_compile_cv (result=0x7fff5fbfe440, ast=0x103e6f100) at > zend_compile.c:2178 > 2178 if (zend_string_equals_literal(name, "this")) { > (gdb) bt > #0 zend_try_compile_cv (result=0x7fff5fbfe440, ast=0x103e6f100) at > zend_compile.c:2178 > #1 0x00000001002b7ff1 in zend_compile_simple_var [inlined] () at > /php-7.0.0RC7/Zend/zend_compile.c:2226 > #2 0x00000001002b7ff1 in zend_compile_var (result=0x7fff5fbfe440, > ast=0x103e6f100, type=0) at zend_compile.c:7219 > #3 0x00000001002bb46d in zend_compile_args (ast=0xfffffffffffff2f5, > fbc=0x103e6f100) at zend_compile.c:2722 > #4 0x00000001002b7e62 in zend_compile_call_common (result=0x7fff5fbfe648, > args_ast=0xfffffffffffff2f5, fbc=0x10232e050) at zend_compile.c:2810 > #5 0x00000001002ba8e5 in zend_compile_call (result=0x7fff5fbfe648, > ast=0x103e6f100, type=65523712) at zend_compile.c:3245 > #6 0x00000001002b7366 in zend_compile_expr (result=0x7fff5fbfe648, > ast=0x103e6f100) at zend_compile.c:7111 > #7 0x00000001002b428f in zend_compile_echo [inlined] () at > /php-7.0.0RC7/Zend/zend_compile.c:3616 > #8 0x00000001002b428f in zend_compile_stmt (ast=0x103e750d0) at > zend_compile.c:7007 > #9 0x00000001002b7990 in zend_compile_top_stmt (ast=0x103e750d0) at > zend_compile.c:6966 > #10 0x00000001002b797d in zend_compile_top_stmt (ast=0x103e750e0) at > zend_compile.c:6961 > #11 0x00000001002b797d in zend_compile_top_stmt (ast=0x103e770a8) at > zend_compile.c:6961 > #12 0x000000010029e6f2 in compile_file (file_handle=0x7fff5fbfe728, > type=65523712) at zend_language_scanner.l:607 > #13 0x00000001002cc4dc in zend_execute_scripts (type=8, > retval=0x7fff5fbfe990, file_count=1606412688) at zend.c:1422 > #14 0x000000010026a1a9 in php_execute_script (primary_file=0x7fff5fbff6d8) > at main.c:2471 > #15 0x000000010035dad4 in do_cli [inlined] () at > /php-7.0.0RC7/sapi/cli/php_cli.c:974 > #16 0x000000010035dad4 in main (argc=1606416352, argv=0x7fff5fbff7e0) at > php_cli.c:1345 > > (again, works fine on Linux) > > > > > Kaplan > > > > On Sun, Nov 22, 2015 at 10:51 PM, Andrea Faulds wrote: > >> Hi Lior, >> >> Lior Kaplan wrote: >> >>> Fatal error: Redefinition of parameter $argv in >>> /php-7.0.0RC7/pear/fetch.php on line 3 >>> make: *** [install-pear] Error 255 >>> >> >> This is a strange and rather concerning error message. If I look at the >> source code of /pear/fetch.php in php-src, line three looks like this: >> >> function usage($argv) { >> >> $argv here is only specified once in the parameter list, yet it produces >> an error. Now, presumably this is some sort of conflict with the global >> variable $argv. But that's a global, not a superglobal, so it really >> shouldn't cause an error here. >> >> This looks like it might be a serious PHP 7 bug. >> >> And yet I can't reproduce it by running pear/fetch.php. Is something >> weird >> going on here? >> >> Thanks. >> >> -- >> Andrea Faulds >> http://ajf.me/