php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68054 PHP crash when working with stream filters
Submitted: 2014-09-19 14:38 UTC Modified: 2014-10-28 16:20 UTC
From: lisachenko dot it at gmail dot com Assigned:
Status: Closed Package: *General Issues
PHP Version: master-Git-2014-09-19 (snap) OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: lisachenko dot it at gmail dot com
New email:
PHP Version: OS:

 

 [2014-09-19 14:38 UTC] lisachenko dot it at gmail dot com
Description:
------------
I am receiving segmentation fault for my framework. Unfortunately, I'm not able to create a simple test case, but this crash is reproduced everytime, so I took a log dump.

Internally, framework tries to do something like that:
include 'php://filter/read=some.filter.name/resource=some.file.php'
and then dies during php_stream_filter->rewrite() in the custom stream handler.

Debug info:
In php__PID__940__Date__09_19_2014__Time_10_08_37AM__447__Second_Chance_Exception_C0000005.dmp the assembly instruction at php7!zend_fetch_debug_backtrace+1c6 in c:\php\php-master-nts-windows-vc11-x86-r551ee41\php7.dll from The PHP Group has caused an access violation exception (0xC0000005) when trying to read from memory location 0x00000000 on thread 0

ChildEBP RetAddr  Args to Child              
04aacfa0 6343aa16 04aacfd8 00000000 00000000 php7!zend_fetch_debug_backtrace+0x1c6 [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend_builtin_functions.c @ 2440]
04aacfe4 6343aa9b 0ad213a8 00000000 63417e34 php7!zend_default_exception_new_ex+0x36 [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend_exceptions.c @ 163]
04aacff0 63417e34 0ad213a8 0ac16c60 63417d8f php7!zend_default_exception_new+0xb [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend_exceptions.c @ 175]
04aacffc 63417d8f 04aad03c 0ad213a8 00000000 php7!_object_and_properties_init+0x94 [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend_api.c @ 1340]
04aad00c 63448022 04aad03c 0ad213a8 0ac164b0 php7!_object_init_ex+0xf [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend_api.c @ 1348]
04aad048 6343fbf0 00000040 634a2cb1 0ac164b0 php7!ZEND_NEW_SPEC_HANDLER+0x42 [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend_vm_execute.h @ 1075]
04aad050 634a2cb1 0ac164b0 0ac164b0 0ac0d628 php7!execute_ex+0x20 [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend_vm_execute.h @ 352]
04aad10c 634a2616 04aad11c 04aad0fc 00000030 php7!zend_call_function+0x691 [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend_execute_api.c @ 850]
04aad148 6367d84c 00000000 0ac7b858 04aad188 php7!call_user_function_ex+0x76 [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend_execute_api.c @ 656]
04aad208 634f8db0 0ac64000 0ac7b850 04aad248 php7!userfilter_filter+0x17c [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\ext\standard\user_filters.c @ 218]
04aad254 634f8c24 0ac9b000 00001000 04aad498 php7!_php_stream_fill_read_buffer+0xe0 [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\main\streams\streams.c @ 614]
04aad274 634d3a3d 0ac64000 0aca4000 00001000 php7!_php_stream_read+0x94 [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\main\streams\streams.c @ 745]
04aad288 634d360d 04aad498 0aca4000 00001000 php7!zend_stream_read+0x6d [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend_stream.c @ 177]
04aad2a8 634bfc84 04aad498 04aad2c4 04aad2c8 php7!zend_stream_fixup+0x11d [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend_stream.c @ 261]
04aad2c8 634bf836 04aad498 04aad2f8 6ef52a47 php7!open_file_for_scanning+0x44 [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend_language_scanner.l @ 489]
04aad35c 636caf1b 04aad498 00000002 6ef52a47 php7!compile_file+0x46 [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend_language_scanner.l @ 568]
04aad39c 00000000 00000000 00000000 00000000 php7!phar_compile_file+0x1cb [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\ext\phar\phar.c @ 3358]

Expected result:
----------------
Normal behaviour

Actual result:
--------------
Segmentation fault

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-10-06 16:12 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2014-10-06 16:12 UTC] ab@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


any update on this, have you tried the latest builds or were able to extract a repro?
 [2014-10-28 16:20 UTC] lisachenko dot it at gmail dot com
-Status: Feedback +Status: Closed
 [2014-10-28 16:20 UTC] lisachenko dot it at gmail dot com
Fixed somewhere in the master. Snap php-master-nts-windows-vc11-x86-r010f4b7 is working for me now.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 00:01:33 2024 UTC