Bug #60167 [Opn]: Crash / memory corruption
| From: | thekid@php.net | Date: | Wed, 23 Nov 2011 14:25:45 +0000 |
| Subject: | Bug #60167 [Opn]: Crash / memory corruption | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-165455@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
Updated by: thekid@php.net
Reported by: thekid@php.net
Summary: Crash / memory corruption
Status: Open
Type: Bug
Package: COM related
Operating System: Windows
PHP Version: 5.4.0
Block user comment: N
Private report: N
New Comment:
The issue described in bug #55715 is solved by the patch, too:
Timm Friebe@carla ~/devel/php/php-src-5.4
$ cat test.xls
A1 B1 C1 D1 E1
(using tab-seperated values here)
Timm Friebe@carla ~/devel/php/php-src-5.4
$ cat excel.php
<?php
$excel= new COM('Excel.Application');
$excel->Workbooks->Open(realpath('test.xls'));
$worksheet= $excel->ActiveSheet;
for ($j= 1; $j <= 5; $j++) {
echo $worksheet->Cells(1, $j)->Value, "\n";
}
$excel->Quit();
?>
Timm Friebe@carla ~/devel/php/php-src-5.4
$ ./Release_TS/php.exe excel.php
A1
B1
C1
D1
E1
Previous Comments:
------------------------------------------------------------------------
[2011-11-23 09:04:00] thekid@php.net
Occurs in any 5.4 version until nowm on any Windows OS.
------------------------------------------------------------------------
[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