Bug #60167 [Com]: Crash / memory corruption
| From: | bugzilla33 at gmail dot com | Date: | Sat, 12 Nov 2011 09:39:32 +0000 |
| Subject: | Bug #60167 [Com]: Crash / memory corruption | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-165077@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60167&edit=1
ID: 60167
Comment by: bugzilla33 at gmail dot com
Reported by: thekid@php.net
Summary: Crash / memory corruption
Status: Open
Type: Bug
Package: COM related
Operating System: Windows Vista
PHP Version: 5.4.0beta2
Block user comment: N
Private report: N
New Comment:
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);
?>
Previous Comments:
------------------------------------------------------------------------
[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