Bug #48034 [Com]: Crash when script is 8192 (8KB) bytes long

2012-01-16 Thread pvasilevich at parallels dot com
Edit report at https://bugs.php.net/bug.php?id=48034&edit=1

 ID: 48034
 Comment by: pvasilevich at parallels dot com
 Reported by:ninzya at inbox dot lv
 Summary:Crash when script is 8192 (8KB) bytes long
 Status: Assigned
 Type:   Bug
 Package:Reproducible crash
 Operating System:   *
 PHP Version:5.*, 6CVS (2009-04-21)
 Assigned To:dmitry
 Block user comment: N
 Private report: N

 New Comment:

I have applied similar patch and problem solved. ( I have removed #ifdef 
HAVE_MMAP at all)


Previous Comments:

[2012-01-16 14:46:00] dmitry at zend dot com

Can anyone check if the attached patch fixes the problem?


[2012-01-16 11:56:48] pvasilevich at parallels dot com

This problem reproduced in 5.3.9 released in public/

It looks like temporary workaround commmited by dmitry in 
Revision: 279490
(Date: 2:13:30 PM, Tuesday, April 28, 2009)
Message:
Fixed bug #48034 (PHP crashes when script is 8192 (8KB) bytes long)

has been replaced by 

Revision: 316812
Author: dmitry
Date: 6:30:17 PM, Thursday, September 15, 2011
Message:
Fixed bug #50982 (incorrect assumption of PAGE_SIZE size)

And bug appeared again.

Please fix this problem ASAP.


[2012-01-11 09:35:29] bugzilla33 at gmail dot com

The shortest working example:


run testcase

Use Apache 2.2.21, PHP 5.*, Win 7 x86/x64


[2012-01-11 09:12:08] bugzilla33 at gmail dot com

Description:

1. use Test script to generate crash.php, size 8192 bytes
2. now let crash php engine crash.php
3. Any php file of size 8192 bytes crashes Apache and PHP!
4. Tested with Apache 2.2.21 V9 apache longue, PHP 5.4.0 RC5 or RC6 dev on 
three other machines, Win 7 x86 or Win 7 x64.

Test script:
---
testcase php file generator:

';

 file_put_contents('crash.php',$out);

 print('1. testcase file generated: crash.php, size '.strlen($out).' 
bytes');
 print('2. now let crash php engine crash.php');
 print('3. Any php file of size 8192 bytes crashes Apache 
and PHP!');
 print('4. Tested with Apache 2.2.21 V9 apache longue, PHP 5.4.0 RC5 or RC6 dev 
on three other machines, Win 7 x86 or Win 7 x64.');
?>

Expected result:

NO crash

Actual result:
--
CRASH


[2009-05-04 16:06:37] paj...@php.net

Not fixed. Only a temp hack.




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

https://bugs.php.net/bug.php?id=48034


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=48034&edit=1


Bug #48034 [Com]: Crash when script is 8192 (8KB) bytes long

2012-01-16 Thread pvasilevich at parallels dot com
Edit report at https://bugs.php.net/bug.php?id=48034&edit=1

 ID: 48034
 Comment by: pvasilevich at parallels dot com
 Reported by:ninzya at inbox dot lv
 Summary:Crash when script is 8192 (8KB) bytes long
 Status: Assigned
 Type:   Bug
 Package:Reproducible crash
 Operating System:   *
 PHP Version:5.*, 6CVS (2009-04-21)
 Assigned To:dmitry
 Block user comment: N
 Private report: N

 New Comment:

This problem reproduced in 5.3.9 released in public/

It looks like temporary workaround commmited by dmitry in 
Revision: 279490
(Date: 2:13:30 PM, Tuesday, April 28, 2009)
Message:
Fixed bug #48034 (PHP crashes when script is 8192 (8KB) bytes long)

has been replaced by 

Revision: 316812
Author: dmitry
Date: 6:30:17 PM, Thursday, September 15, 2011
Message:
Fixed bug #50982 (incorrect assumption of PAGE_SIZE size)

And bug appeared again.

Please fix this problem ASAP.


Previous Comments:

[2012-01-11 09:35:29] bugzilla33 at gmail dot com

The shortest working example:


run testcase

Use Apache 2.2.21, PHP 5.*, Win 7 x86/x64


[2012-01-11 09:12:08] bugzilla33 at gmail dot com

Description:

1. use Test script to generate crash.php, size 8192 bytes
2. now let crash php engine crash.php
3. Any php file of size 8192 bytes crashes Apache and PHP!
4. Tested with Apache 2.2.21 V9 apache longue, PHP 5.4.0 RC5 or RC6 dev on 
three other machines, Win 7 x86 or Win 7 x64.

Test script:
---
testcase php file generator:

';

 file_put_contents('crash.php',$out);

 print('1. testcase file generated: crash.php, size '.strlen($out).' 
bytes');
 print('2. now let crash php engine crash.php');
 print('3. Any php file of size 8192 bytes crashes Apache 
and PHP!');
 print('4. Tested with Apache 2.2.21 V9 apache longue, PHP 5.4.0 RC5 or RC6 dev 
on three other machines, Win 7 x86 or Win 7 x64.');
?>

Expected result:

NO crash

Actual result:
--
CRASH


[2009-05-04 16:06:37] paj...@php.net

Not fixed. Only a temp hack.


[2009-04-28 07:16:19] dmi...@php.net

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




[2009-04-22 11:09:23] bj...@php.net

See also bug#48043




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

https://bugs.php.net/bug.php?id=48034


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=48034&edit=1


[PHP-BUG] Bug #54407 [NEW]: Incorrectly defined NTDDI_VERSION macro

2011-03-28 Thread pvasilevich at parallels dot com
From: 
Operating system: Windows Server 2008
PHP version:  5.3.6
Package:  Compile Failure
Bug Type: Bug
Bug description:Incorrectly defined NTDDI_VERSION macro 

Description:

win32\build\config.w32.h.in  file contains the following code:



/* Define the minimum supported version */

#undef _WIN32_WINNT

#undef NTDDI_VERSION

#define _WIN32_WINNT 0x500

#define NTDDI_VERSION  _WIN32_WIN2K



Now look at some Windows Platform SDK file, for example ShlObj.h:



#if (NTDDI_VERSION >= NTDDI_WIN2K)



you see that NTDDI_VERSION is compared to NTDDI_WIN2K, but NTDDI_WIN2K is
defined in the following way:



#define NTDDI_WIN2K  0x0500



So, macro NTDDI_VERSION defined in php config.w32.h equals to 0x500

, but compared to 0x0500.



This is incorrect behavior and should be fixed.

Test script:
---
Schematic script:



#defined _WIN32_WINNT 0x500



#include "zend.h"

#include "ShlObj.h"



...

TCHAR ret[MAX_PATH + 1];

SHGetFolderPath(NULL, CSIDL_FLAG_CREATE, NULL, SHGFP_TYPE_CURRENT, ret);

Expected result:

NTDDI_VERSION is defined like:

#define NTDDI_WIN2K  0x0500



OR



do not unset _WIN32_WINNT and NTDDI_VERSION if they are defined.


-- 
Edit bug report at http://bugs.php.net/bug.php?id=54407&edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=54407&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=54407&r=trysnapshot53
Try a snapshot (trunk):  
http://bugs.php.net/fix.php?id=54407&r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=54407&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=54407&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=54407&r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=54407&r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=54407&r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=54407&r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=54407&r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=54407&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=54407&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=54407&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=54407&r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=54407&r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=54407&r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=54407&r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=54407&r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=54407&r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=54407&r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=54407&r=mysqlcfg