php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64597 Parsekit causes "Segmentation fault: 11"
Submitted: 2013-04-06 05:04 UTC Modified: 2017-04-01 21:16 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: krinklemail at gmail dot com Assigned:
Status: Wont fix Package: parsekit (PECL)
PHP Version: 5.4.13 OS: Mac OS
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2013-04-06 05:04 UTC] krinklemail at gmail dot com
Description:
------------
While using parsekit (latest stable, v1.3.0) in a lint tool to test a larger code 
base I ran into 
"Segmentation fault: 11".

I reduced and reduced and reduced until I ended up with a very small example that 
still caused.

Test script:
---------------
-- test.php
<?php

class Example {
	static $foo = array( T_ABSTRACT, T_PRIVATE );
}

--- parse.php
<?php

$errors = array();
parsekit_compile_file(__DIR__ . '/test.php', $errors, PARSEKIT_SIMPLE);
var_dump($errors);


Expected result:
----------------
-- $ php parse.php
NULL

Actual result:
--------------
-- $ php parse.php
Segmentation fault: 11

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-04-06 05:35 UTC] krinklemail at gmail dot com
It doesn't happen if I remove one of the array items.

It doesn't happen if I remove random characters of it, ending up with invalid php 
syntax.

It does happen if I leave only the php open tag, and open/close curly brace with a 
dollar sign in between:

-- test.php
<?php {$}


What's going on !?
 [2017-04-01 21:16 UTC] tpunt@php.net
-Status: Open +Status: Wont fix
 [2017-04-01 21:16 UTC] tpunt@php.net
Due to this extension not seeing any activity since 2009, this issue will not be fixed. We are therefore closing this now.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Nov 17 00:01:34 2019 UTC