php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63528 Generators crash on Zend\tests\generators\clone_with_stack.phpt
Submitted: 2012-11-15 14:35 UTC Modified: 2012-12-04 14:28 UTC
Votes:2
Avg. Score:3.5 ± 0.5
Reproduced:0 of 1 (0.0%)
From: ab@php.net Assigned: nikic (profile)
Status: Closed Package: *General Issues
PHP Version: 5.5Git-2012-11-15 (Git) 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: ab@php.net
New email:
PHP Version: OS:

 

 [2012-11-15 14:35 UTC] ab@php.net
Description:
------------
Both TS and NTS crash. On a debug build VS gives the following error:

Unhandled exception at 0x102D369E (php5ts_debug.dll) in php.exe: 0xC0000005: Access violation reading location 0x5A5A5A56.

and the debugger stops in zend_execute.h:337 (second line in zend_vm_stack_clear_multiple()). 

Here is the corresponding BT:

	php5ts_debug.dll!zend_vm_stack_clear_multiple(void * * * tsrm_ls) Line 337	C
 	php5ts_debug.dll!zend_do_fcall_common_helper_SPEC(_zend_execute_data * execute_data, void * * * tsrm_ls) Line 736	C
 	php5ts_debug.dll!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER(_zend_execute_data * execute_data, void * * * tsrm_ls) Line 879	C
 	php5ts_debug.dll!execute_ex(_zend_execute_data * execute_data, void * * * tsrm_ls) Line 436	C
 	php5ts_debug.dll!execute(_zend_op_array * op_array, void * * * tsrm_ls) Line 461	C
 	php5ts_debug.dll!zend_execute_scripts(int type, void * * * tsrm_ls, _zval_struct * * retval, int file_count, ...) Line 1309	C
 	php5ts_debug.dll!php_execute_script(_zend_file_handle * primary_file, void * * * tsrm_ls) Line 2468	C
 	php.exe!do_cli(int argc, char * * argv, void * * * tsrm_ls) Line 988	C
 	php.exe!main(int argc, char * * argv) Line 1364	C
 	php.exe!__tmainCRTStartup() Line 582	C
 	php.exe!mainCRTStartup() Line 399	C
 	kernel32.dll!76971866()	Unknown
 	[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]	
 	ntdll.dll!770668f1()	Unknown
 	ntdll.dll!7706689d()	Unknown
 

Test script:
---------------
Zend\tests\generators\clone_with_stack.phpt

Expected result:
----------------
Test diff:

001+
001- string(10) "xxxxxxxxxx"

Actual result:
--------------
test pass

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-11-15 15:57 UTC] ab@php.net
Btw. there are no valgrind complains on Linux for this test.
 [2012-11-15 15:57 UTC] ab@php.net
-Assigned To: +Assigned To: nikic
 [2012-11-21 12:04 UTC] nikic@php.net
Is this the only test that is failing for you?

I just played around with it on Windows and for me anything involving pushed stack arguments crashes. E.g. the yield_during_function_call test.
 [2012-11-22 20:31 UTC] ab@php.net
No, only the mentioned test fails for me. Newly tested with both TS and NTS snaps from Nov 22th http://windows.php.net/downloads/snaps/php-5.5/ . A way to repro your fails?
 [2012-12-03 14:22 UTC] ab@php.net
nikic, any progress on this one?
 [2012-12-03 15:51 UTC] nikic@php.net
@ab: I just tried the current build (php-5.5-nts-windows-vc9-x86-r262decd) and this does not occur anymore. I think that dmitry's changes fixed this as a side effect. Does the issue persist for you?
 [2012-12-04 14:28 UTC] ab@php.net
-Status: Assigned +Status: Closed
 [2012-12-04 14:28 UTC] ab@php.net
The fix for this bug has been committed.

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/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

Fixed with these two commits:

https://github.com/php/php-src/commit/66b8ece02a9592fb70d1ca2990614004858c4e8b
https://github.com/php/php-src/commit/70f83f35d089d0cafae12ae231a38541f5c8e41c
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 12:01:32 2024 UTC