php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75698 Using @ crashes php7.2-fpm
Submitted: 2017-12-16 20:30 UTC Modified: -
From: aruggirello at tiscali dot it Assigned:
Status: Closed Package: Reproducible crash
PHP Version: 7.2.0 OS: Ubuntu 16.04/amd64
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
11 + 4 = ?
Subscribe to this entry?

 
 [2017-12-16 20:30 UTC] aruggirello at tiscali dot it
Description:
------------
Serving the test script via php7.2-fpm results in php worker process always crashing. Removing the @ fixes the problem, but logs undesided warnings. The actual code being used is rather complex, the test script has just the minimum statements required to reproduce the crash.

Note that PHP <= 7.1 handles the test code correctly - it does not crash.

Test script:
---------------
<?php
error_reporting(E_ALL|E_STRICT);

function test() {
  $a = array("a","b","c","b");
  $b = array();
  foreach ($a as $c)
    @$b[$c]++; // the @ is required to crash PHP 7.2.0
  var_dump($b);
}

test();



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-12-16 21:04 UTC] nikic@php.net
Automatic comment on behalf of nikita.ppv@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ee45104dbafc937d944995733f93fd4f160a6922
Log: Fixed bug #75698
 [2017-12-16 21:04 UTC] nikic@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Oct 23 02:01:31 2019 UTC