php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45613 Segfault when using is_file() on Apache-2.2.8
Submitted: 2008-07-24 08:02 UTC Modified: 2008-08-14 13:23 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: crocodile2u at yandex dot ru Assigned: dmitry (profile)
Status: Closed Package: Apache2 related
PHP Version: 5.3CVS-2008-07-24 (CVS) OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
23 + 16 = ?
Subscribe to this entry?

 
 [2008-07-24 08:02 UTC] crocodile2u at yandex dot ru
Description:
------------
Get a segfault when using is_file() in a web-server environment (Apache/2.2.8 (Ubuntu) PHP/5.3.0-dev). Seems to be web-server related as CLI version works as expected.

Reproduce code:
---------------
<?php

var_dump(is_file("x"));

Expected result:
----------------
bool(false)

Actual result:
--------------
segmentation fault

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-24 09:24 UTC] scottmac@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.
 [2008-07-24 09:44 UTC] crocodile2u at yandex dot ru
Because I needed a working project today - I installed a previous snapshopt of PHP-5.3 which did not have this issue. On sunday, I will surely reinstall the problematic snapshot and provide a trace.
 [2008-07-28 08:58 UTC] crocodile2u at yandex dot ru
I've just installed the latest snapshot of PHP-5.3 and the problem persists. The dump:

#0  0x00000000 in ?? ()
#1  0xb71feef8 in phar_is_file (ht=1, return_value=0x83db0b8, return_value_ptr=0x0, this_ptr=0x0, return_value_used=0, tsrm_ls=0x83c5a70)
    at /home/vbolshov/src/php/php5.3-200807280630/ext/phar/func_interceptors.c:956
#2  0xb73f3828 in zend_do_fcall_common_helper_SPEC (execute_data=0x84a0a70, tsrm_ls=0x83c5a70)
    at /home/vbolshov/src/php/php5.3-200807280630/Zend/zend_vm_execute.h:313
#3  0xb73e00b5 in execute (op_array=0x83dac2c, tsrm_ls=0x83c5a70) at /home/vbolshov/src/php/php5.3-200807280630/Zend/zend_vm_execute.h:104
#4  0xb73bad2f in zend_execute_scripts (type=8, tsrm_ls=0x83c5a70, retval=0x0, file_count=3) at /home/vbolshov/src/php/php5.3-200807280630/Zend/zend.c:1199
#5  0xb73617d5 in php_execute_script (primary_file=0xb44c41f0, tsrm_ls=0x83c5a70) at /home/vbolshov/src/php/php5.3-200807280630/main/main.c:2088
#6  0xb744fa48 in php_handler (r=0x83cac20) at /home/vbolshov/src/php/php5.3-200807280630/sapi/apache2handler/sapi_apache2.c:630
#7  0x08079639 in ap_run_handler ()
#8  0x0807ca47 in ap_invoke_handler ()
#9  0x08089d60 in ap_process_request ()
#10 0x0808706b in ?? ()
#11 0x083cac20 in ?? ()
#12 0x00000004 in ?? ()
#13 0x083cac20 in ?? ()
#14 0x00000000 in ?? ()

--------------------
Source code for the script was:

<?php

is_file("x");
 [2008-08-05 11:15 UTC] crocodile2u at yandex dot ru
The problem is still here with PHP-5.3.0alpha
 [2008-08-14 12:06 UTC] tony2001@php.net
Here is a patch for it (made by Dmitry):
http://dev.daylessday.org/diff/bug45613.diff
 [2008-08-14 12:28 UTC] helly@php.net
Dmitry, please submit, patch looks correct.
 [2008-08-14 13:23 UTC] dmitry@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 03:01:28 2024 UTC