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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: taneli at crasman dot fi
New email:
PHP Version: OS:

 

 [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

Pull Requests

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