ID:               32957
 Updated by:       [EMAIL PROTECTED]
 Reported By:      ukm at servplus dot ru
-Status:           Feedback
+Status:           Closed
 Bug Type:         Reproducible crash
 Operating System: win xp sp2
 PHP Version:      4.3.11
 Assigned To:      wez
 New Comment:

Yes, that fixed it. Committed.



Previous Comments:
------------------------------------------------------------------------

[2005-05-08 04:07:48] [EMAIL PROTECTED]

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?


------------------------------------------------------------------------

[2005-05-08 03:45:34] [EMAIL PROTECTED]

Wez, here's the callstack:

NTDLL! 77f57ec4()
MSVCRT! 77c1ac14()
MSVCRT! 77c1ac2a()
MSVCRT! 77c241a7()
zif_putenv(int 1, _zval_struct * 0x01299878, _zval_struct * 0x00000000,
int 0, void * * * 0x01172948) line 1433 + 12 bytes
execute(_zend_op_array * 0x01298f88, void * * * 0x01172948) line 1654 +
47 bytes
zend_execute_scripts(int 8, void * * * 0x01172948, _zval_struct * *
0x00000000, int 3) line 926 + 34 bytes
php_execute_script(_zend_file_handle * 0x0012ff54, void * * *
0x01172948) line 1747 + 27 bytes
main(int 2, char * * 0x01172580) line 828 + 14 bytes
mainCRTStartup() line 338 + 17 bytes
KERNEL32! 77e8141a()

Let me know if you need something else..I'm not very good with
debugging under win32. :)


------------------------------------------------------------------------

[2005-05-05 22:09:03] [EMAIL PROTECTED]

tony2001: ms libc putenv function does have at least one segfault bug
that we have a workaround for.  Someone needs to check a debug build of
4.3 on windows; preferably someone with MS VC 6 installed, as the libc
has changed between releases.  I'd check it myself, but I only have
vs.net installed, so it would be a bogus check.

------------------------------------------------------------------------

[2005-05-05 16:22:00] 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=");
}

?>



------------------------------------------------------------------------


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

Reply via email to