Bug #67952 [Com]: strncasecmp() crashes on CLI sapi NTS builds with Opcache

From: Date: Wed, 03 Sep 2014 18:26:13 +0000
Subject: Bug #67952 [Com]: strncasecmp() crashes on CLI sapi NTS builds with Opcache
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-187405@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67952&edit=1 ID: 67952 Comment by: mattficken@php.net Reported by: mattficken@php.net Summary: strncasecmp() crashes on CLI sapi NTS builds with Opcache Status: Open Type: Bug Package: Reproducible crash Operating System: Windows PHP Version: master-Git-2014-09-02 (snap) Block user comment: N Private report: N New Comment: I'm using VC CRT: VC11 x86 11.0.51106 Also has these CRTs installed: VC10 x86 10.0.40219 VC9 x86 9.0.21022 This only repros on NTS builds with CLI sapi with Opcache enabled. It repros for me every time I run the ext/standard/tests/string/*strncasecmp* PHPTs. TS builds, builtin web SAPI or Opcache disabled and it doesn't repro. I haven't tried IIS/FastCGI. And, I'm doing this on Windows VMs. I haven't tried on bare-metal, but that shouldn't matter (memory should act the same). Previous Comments: ------------------------------------------------------------------------ [2014-09-02 21:35:18] mattficken@php.net Opcache must be enabled to repro the crashes. It does not crash without opcache. ------------------------------------------------------------------------ [2014-09-02 21:32:49] mattficken@php.net Description: ------------ PHPTs using strncasecmp() (in ext/standard/tests/string) crash NTS builds when CLI SAPI is used. Builtin_web, Apache or TS builds are not affected. Initially found by automated test run on rb9514bb, still repros on latest r5138f3b snapshot. This is after the phpng and AST merges, but initially, before the new memory manager merge. Maybe its a phpng bug? Crashes in 3 places. See BTs below. Test script: --------------- Run the strncasecmp*phpt PHPTs from ext/standard/tests/string. Not a stress test. Repros every time I run it. Expected result: ---------------- Test pass Actual result: -------------- 050be7f8 6f01d509 php7!_zend_mm_free_int+0x11c [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend_alloc.c @ 2116] 050be804 6f0d651c php7!_efree+0x19 [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend_alloc.c @ 2451] 050be810 6f048677 php7!_zval_dtor_func_for_ptr+0x3c [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend_variables.c @ 97] 050be840 6f041960 php7!ZEND_DO_FCALL_SPEC_HANDLER+0x287 [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend_vm_execute.h @ 600] 050be848 6f041932 php7!execute_ex+0x20 [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend_vm_execute.h @ 354] 050be86c 6f012aea php7!zend_execute+0x272 [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend_vm_execute.h @ 383] 050be8c0 6f0df05e php7!zend_execute_scripts+0xaa [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend.c @ 1319] *** WARNING: Unable to verify checksum for C:\php-sdk\php-master-nts-windows-vc11-x86-rb9514bb\php.exe 050bfad0 00ff2314 php7!php_execute_script+0x1de [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\main\main.c @ 2567] 050bfd90 00ff2ec8 php!do_cli+0x874 [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\sapi\cli\php_cli.c @ 981] 050bfe28 00ffab3c php!main+0x488 [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\sapi\cli\php_cli.c @ 1358] *** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\syswow64\kernel32.dll - 050bfe68 76bf3677 php!__tmainCRTStartup+0xfd [f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 536] WARNING: Stack unwind information not available. Following frames may be wrong. 050bfe74 775e9d72 kernel32!BaseThreadInitThunk+0x12 050bfeb4 775e9d45 ntdll!RtlInitializeExceptionChain+0x63 050bfecc 00000000 ntdll!RtlInitializeExceptionChain+0x36 050fe818 6f01d509 php7!_zend_mm_free_int+0x283 [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend_alloc.c @ 2121] 050fe824 6f0d651c php7!_efree+0x19 [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend_alloc.c @ 2451] 050fe830 6f048677 php7!_zval_dtor_func_for_ptr+0x3c [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend_variables.c @ 97] 050fe860 6f041960 php7!ZEND_DO_FCALL_SPEC_HANDLER+0x287 [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend_vm_execute.h @ 600] 050fe868 6f041932 php7!execute_ex+0x20 [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend_vm_execute.h @ 354] 050fe88c 6f012aea php7!zend_execute+0x272 [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend_vm_execute.h @ 383] 050fe8e0 6f0df05e php7!zend_execute_scripts+0xaa [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend.c @ 1319] *** WARNING: Unable to verify checksum for C:\php-sdk\php-master-nts-windows-vc11-x86-rb9514bb\php.exe 050ffae8 00ff2314 php7!php_execute_script+0x1de [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\main\main.c @ 2567] 050ffda8 00ff2ec8 php!do_cli+0x874 [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\sapi\cli\php_cli.c @ 981] 050ffe40 00ffab3c php!main+0x488 [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\sapi\cli\php_cli.c @ 1358] *** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\syswow64\kernel32.dll - 050ffe80 76bf3677 php!__tmainCRTStartup+0xfd [f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 536] WARNING: Stack unwind information not available. Following frames may be wrong. 050ffe8c 775e9d72 kernel32!BaseThreadInitThunk+0x12 050ffecc 775e9d45 ntdll!RtlInitializeExceptionChain+0x63 050ffee4 00000000 ntdll!RtlInitializeExceptionChain+0x36 0508f82c 6f015649 php7!zend_hash_del+0x78 [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend_hash.c @ 697] 0508f858 6f0144c1 php7!zend_unregister_functions+0x79 [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend_api.c @ 2461] 0508f86c 6f0132dd php7!module_destructor+0x81 [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend_api.c @ 2536] 0508f878 6f0a67b1 php7!module_destructor_zval+0xd [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend.c @ 613] 0508f8a4 6f015ca2 php7!zend_hash_graceful_reverse_destroy+0x151 [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend_hash.c @ 990] 0508f8b4 6f0114b5 php7!zend_destroy_modules+0x22 [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend_api.c @ 2026] 0508f8c0 6f0dec23 php7!zend_shutdown+0x15 [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\zend\zend.c @ 819] *** WARNING: Unable to verify checksum for C:\php-sdk\php-master-nts-windows-vc11-x86-rb9514bb\php.exe 0508f8c4 00ff2f1e php7!php_module_shutdown+0x23 [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\main\main.c @ 2449] 0508f954 00ffab3c php!main+0x4de [c:\php-sdk\snap_master\vc11\x86\nts-windows-vc11-x86\sapi\cli\php_cli.c @ 1375] *** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\syswow64\kernel32.dll - 0508f994 76bf3677 php!__tmainCRTStartup+0xfd [f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 536] WARNING: Stack unwind information not available. Following frames may be wrong. 0508f9a0 775e9d72 kernel32!BaseThreadInitThunk+0x12 0508f9e0 775e9d45 ntdll!RtlInitializeExceptionChain+0x63 0508f9f8 00000000 ntdll!RtlInitializeExceptionChain+0x36 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67952&edit=1

« previous php.bugs (#187405) next »