Bug #60167 [Opn]: Crash / memory corruption
Edit report at https://bugs.php.net/bug.php?id=60167&edit=1
ID: 60167
User updated by: thekid@php.net
Reported by: thekid@php.net
Summary: Crash / memory corruption
Status: Open
Type: Bug
Package: COM related
-Operating System: Windows Vista
+Operating System: Windows
-PHP Version: 5.4.0beta2
+PHP Version: 5.4.0
Block user comment: N
Private report: N
New Comment:
Occurs in any 5.4 version until nowm on any Windows OS.
Previous Comments:
------------------------------------------------------------------------
[2011-11-12 09:39:32] bugzilla33 at gmail dot com
Expected result:
----------------
PHP 5.3.9RC1 prints: Microsoft Windows
Actual result:
--------------
PHP 5.4.0RC1 crash
<?php
$z=50;while($z--){
$o=new COM('WinMgmts:',null,CP_UTF8);
foreach($o->ExecQuery('SELECT * FROM Win32_OperatingSystem') as $x){
$s=$x->Caption;
}
}
print($s);
?>
------------------------------------------------------------------------
[2011-11-11 00:05:10] lunter at interia dot pl
Confirmed on PHP 5.4.0 RC1, Apache 2.2.21 VC9
Windows 7 32bit
------------------------------------------------------------------------
[2011-10-29 12:39:25] thekid@php.net
Might be related to #55715
------------------------------------------------------------------------
[2011-10-29 12:38:13] thekid@php.net
Description:
------------
Multiple calls to a COM function result in crash / memory corruption / weird behaviour.
Test script:
---------------
$ php -r '$com= new com("winmgmts:"); foreach (explode(",", $argv[1]) as
$pid) { $p= $com->get("//./root/cimv2:Win32_Process.Handle=$pid"); echo $pid, ":
", $p->executablePath, ": "; var_dump($p->commandLine); }' 3132,2760,3268
Expected result:
----------------
Something like:
3132: C:\...\GoogleToolbarNotifier.exe: string(74)
""C:\...\GoogleToolbarNotifier.exe" "
2760: F:\...\ONENOTEM.EXE: string(58) ""F:\...\ONENOTEM.EXE" /tsr"
3268: F:\...\XWin.exe: string(38) "F:\...\XWin.exe :0 -multiwindow"
Actual result:
--------------
Something like:
3132: C:\...\GoogleToolbarNotifier.exe: string(74)
""C:\...\GoogleToolbarNotifier.exe" "
3132: C:\...\GoogleToolbarNotifier.exe: string(74)
""C:\...\GoogleToolbarNotifier.exe" "
3132: C:\...\GoogleToolbarNotifier.exe: string(74)
""C:\...\GoogleToolbarNotifier.exe" "
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60167&edit=1
Thread (11 messages)
- thekid@php.net
- thekid@php.netBug #60167 [Opn]: Crash / memory corruption
- lunter at interia dot plBug #60167 [Com]: Crash / memory corruption
- bugzilla33 at gmail dot comBug #60167 [Com]: Crash / memory corruption
- thekid@php.netBug #60167 [Opn]: Crash / memory corruption
- thekid@php.netBug #60167 [Opn]: Crash / memory corruption
- thekid@php.netBug #60167 [PATCH]: Crash / memory corruption
- felipe@php.netBug #60167 [Opn]: Crash / memory corruption
- thekid@php.netBug #60167 [Opn]: Crash / memory corruption
- dmitry@php.netBug #60167 [Asn]: Crash / memory corruption
- dmitry@php.netBug #60167 [Asn->Csd]: Crash / memory corruption