php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71096 Segfault on syntax error with symfony's server wrapper.
Submitted: 2015-12-11 17:35 UTC Modified: 2015-12-20 04:22 UTC
Votes:4
Avg. Score:4.2 ± 0.8
Reproduced:4 of 4 (100.0%)
Same Version:1 (25.0%)
Same OS:1 (25.0%)
From: sephir at cryptolab dot net Assigned: laruence (profile)
Status: No Feedback Package: Built-in web server
PHP Version: 7.0.0 OS: Debian 8
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: sephir at cryptolab dot net
New email:
PHP Version: OS:

 

 [2015-12-11 17:35 UTC] sephir at cryptolab dot net
Description:
------------
Hi.

Some days ago, I tried a script containing a syntax error and executed it on both Symfony's server wrapper (executed using server:run command) and Nginx/PHP-FPM.

Using Nginx I had the syntax error as expected but using the Symfony's wrapper I had a segfault, crashing the web server.

I precise that only the server:run command is returning a segfault. The server:start command run as expected.


Test script:
---------------
<?php

namespace AppBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;

class DefaultController extends Controller
{
    public function indexAction()
    {
        $response = $this->render('')
    }
}

Expected result:
----------------
Parse error: syntax error, unexpected '}' 

Actual result:
--------------
[OK] Server running on http://127.0.0.1:8000                                                                           


 // Quit the server with CONTROL-C.
  RUN  '/usr/bin/php7.0' '-S' '127.0.0.1:8000' '/home/booteille/PhpstormProjects/my_project/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/router_dev.php'
  ERR  [Fri Dec  4 05:20:17 2015] 127.0.0.1:60062 [500]: /
  ERR  [Fri Dec  4 05:20:18 2015] 127.0.0.1:60063 [200]: /bundles/framework/css/structure.css
  ERR  [Fri Dec  4 05:20:18 2015] 127.0.0.1:60064 [200]: /bundles/framework/css/exception.css
  ERR  [Fri Dec  4 05:20:18 2015] 127.0.0.1:60065 [200]: /bundles/framework/css/body.css
  ERR  [Fri Dec  4 05:20:18 2015] 127.0.0.1:60066 [200]: /_wdt/f84516
  ERR  Segmentation fault
  ERR  
  RES  139 Command did not run successfully


 [ERROR] Built-in server terminated unexpectedly. 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-12-12 01:44 UTC] laruence@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: laruence
 [2015-12-12 01:44 UTC] laruence@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2015-12-20 04:22 UTC] php-bugs at lists dot php dot 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 "Re-Opened". Thank you.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Jan 26 08:01:24 2020 UTC