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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: krinklemail at gmail dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 05:01:30 2024 UTC