php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57476 crash with runkit_lint() and runkit_lint_file()
Submitted: 2007-01-12 06:48 UTC Modified: 2013-10-15 11:54 UTC
From: taneli at crasman dot fi Assigned:
Status: No Feedback Package: runkit (PECL)
PHP Version: 5.2.0 RC4 OS: RHEL 4
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2007-01-12 06:48 UTC] taneli at crasman dot fi
Description:
------------
I can't reproduce this on a standalone script linting the same code, but in my app it crashes httpd.

PHP 5.2.0 release version.

Reproduce code:
---------------
Sorry, can't give you an reproducible test case.

Expected result:
----------------
No crash :)

Actual result:
--------------
0xb774ca49 in zend_get_zval_ptr_ptr () from /etc/httpd/modules/libphp5.so
(gdb) backtrace
#0  0xb774ca49 in zend_get_zval_ptr_ptr () from /etc/httpd/modules/libphp5.so
#1  0xb6598ae2 in php_runkit_sandbox_sapi_header_handler (
    sapi_header=0xbfeb08d0, sapi_headers=0x8b4bb18, tsrm_ls=0x5)
    at /usr/src/redhat/BUILD/runkit-0.9/runkit_sandbox.c:1102
#2  0xb767efaf in sapi_header_op () from /etc/httpd/modules/libphp5.so
#3  0xb767ec09 in sapi_add_header_ex () from /etc/httpd/modules/libphp5.so

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-12 06:57 UTC] taneli at crasman dot fi
Ok, so I dug in a little deeper and found out that runkit_lint() and runkit_lint_file() only crash when invoked through Apache. Running the same script through commandline works just fine.

So a script for reproducing the error is this:

<?php {
  var_dump(runkit_lint('$foo = 1;'));
}?>

Running this through Apache crashes httpd, but from commandline:

# php5 linttest.php
bool(true)
 [2013-02-23 18:23 UTC] pollita@php.net
-Status: Open +Status: Feedback
 [2013-02-23 18:23 UTC] pollita@php.net
Please try using this snapshot:

  http://snaps.php.net/php-trunk-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2013-10-15 11:54 UTC] pecl-dev 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: Tue Jan 28 09:01:23 2020 UTC