Edit report at https://bugs.php.net/bug.php?id=77194&edit=1
ID: 77194
Updated by: ab@php.net
Reported by: svbussww at 126 dot com
Summary: php7ts.dll crashing when running embed
-Status: Open
+Status: Feedback
Type: Bug
Package: Reproducible crash
Operating System: Windows 7
PHP Version: 7.2.12
Block user comment: N
Private report: N
New Comment:
Thanks for the further info. The embed SAPI has php_embed_startup(), which calls
php_module_startup(). If you call it separately, you might be calling it twice. Otherwise, it's
not clear to me, what exactly is NULL that it tries to dereference, in emalloc, in cwd_globals_ctor?
It would rock, if you could extract only the relevant piece of your code where embed is integrated
(just as one file with the corresponding embed only API calls), that one could review. It's
otherwise a bit hard to guess, as embed is something that gets integrated into another app and the
failures can be specific to that app.
Thanks.
Previous Comments:
------------------------------------------------------------------------
[2018-11-23 20:57:53] svbussww at 126 dot com
Stack
php7ts.dll!_emalloc(unsigned __int64 size) Line 2425
php7ts.dll!cwd_globals_ctor(_virtual_cwd_globals * cwd_g) Line 391
php7ts.dll!allocate_new_resource(_tsrm_tls_entry * * thread_resources_ptr, unsigned long thread_id)
è¡ 315
php7ts.dll!ts_resource_ex(int id, unsigned long * th_id) Line 395
Exception
The first chance exception at 0x000007FEE3C9F648 (php7ts.dll) (in Test.exe): 0xC0000005: An access
violation occurred while reading location 0x0000000000000000.
There is an unhandled exception at 0x000007FEE3C9F648 (php7ts.dll) (in Test.exe): 0xC0000005: An
access violation occurred while reading location 0x0000000000000000.
------------------------------------------------------------------------
[2018-11-23 19:52:45] svbussww at 126 dot com
This problem also exists in VC15
And the problem exists in 7.0.32 7.1.24 7.2.12 7.3.0RC5 In the version
After php_module_startup call
Calling ts_resource_ex in a newly started thread has a chance to crash
Will not crash if php_module_startup is not called
------------------------------------------------------------------------
[2018-11-23 15:38:47] ab@php.net
Thanks for the report. First, vc12 is not suitable, if you use 7.2 binaries from php.net. Please
compile your project with vc15 (vs2017) and post a backtrace. Depending on it, but likely,
we'll need some reproduce, too.
Thanks.
------------------------------------------------------------------------
[2018-11-23 14:08:00] svbussww at 126 dot com
Description:
------------
php - 7.2.12
php - 7.3.0RC5
php.ini
No extensions are turned on
Test script:
---------------
Test script http://jxcraft.net/Test.zip, VC12 Project,
php7ts.dll From https://windows.php.net/download/
,not actually working, because I've cutted some parts from working project. Script works from
time to time and crashes very often.
Actual result:
--------------
Can't initialize heap: [0x000001e7] Attempt to access invalid address.
Problem event name: APPCRASH
Application Name: Test.exe
Application version: 0.0.0.0
Application time stamp: 5bf4612b
Fault module name: php7ts.dll
Fault module version: 7.2.12.0
Fault module timestamp: 5be3d4fd
Exception code: c0000005
Abnormal offset: 000000000001f648
Operating system version: 6.1.7601.2.1.0.256.1
Locale ID: 2052
Other information 1: e3c7
Additional information 2: e3c7d0ab13feedaa62f1ab674aea779c
Additional information 3: ffa7
Additional information 4: ffa7101e299bb1a426430e84b351f5c2
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=77194&edit=1