|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-05-05 16:22 UTC] ukm at servplus dot ru
Description:
------------
During the execution on this fragment with php.exe this application error occures:
The instruction at "0x..." referenced memory at "0x....".
The memory could not be "written".
Reproduce code:
---------------
<?php
for($i = 0; $i < 100; ++$i)
{
putenv("VAR=VALUE");
putenv("VAR=");
}
?>
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 22 21:00:01 2025 UTC |
Not such a useful trace :-/ You should be able to link against the debug version of the libc or download the .pdb files for the release version to get more info. I've just glanced at the putenv code in the 4.3 branch, and it doesn't have my workaround that's in the 5.x branches. Can you try merging the two places where we have: #if _MSC_VER >= 1300 /* VS.Net has a bug in putenv() when setting a variable that * is already set; if the SetEnvironmentVariable() API call * fails, the Crt will double free() a string. * We try to avoid this by setting our own value first */ SetEnvironmentVariable(pe.key, "bugbug"); #endif from basic_functions.c back into the 4.3 branch, but change the "#if _MSC_VER >= 1300" into just "#if _MSC_VER", so that it is used regardless of which version of the MS compiler is being used?