Bug #13641 Updated: Erroneous code makes PHP.EXE crash

From: Date: Fri, 12 Oct 2001 11:23:25 +0000
Subject: Bug #13641 Updated: Erroneous code makes PHP.EXE crash
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-67844@lists.php.net to get a copy of this message
ID: 13641 Updated by: jmoore Reported By: rune@strand.gs Status: Critical Bug Type: Reproducible crash Operating System: Win32 (W2K) PHP Version: 4.0.6 Assigned To: derick New Comment: Works fine here on Win 2k, 4.0.6 and latest CVS. - James Previous Comments: ------------------------------------------------------------------------ [2001-10-12 06:50:53] derick@php.net Marked as critcal, and checking this out. Derick ------------------------------------------------------------------------ [2001-10-12 06:50:15] mfischer@php.net FYI: couldn't reproduce with current CVS under W2K ------------------------------------------------------------------------ [2001-10-12 06:47:42] sander@php.net Reproduced with PHP-4.0.6 on Win98. You can even simplify the code: <?php strtok('foo'); ?> The problem is that you may not call strtok the first time without the second argument. If you do, it will crash, no matter what the first argument is. This should really be fixed before 4.0.7 comes out (if it's not already fixed in CVS, I can't test it right now). ------------------------------------------------------------------------ [2001-10-11 06:48:32] derick@php.net FYI: I could not reproduce this with Linux/4.0.6. ------------------------------------------------------------------------ [2001-10-11 06:42:53] rune@strand.gs <code> <?php $str = "this is text"; $var = strtok($str); echo ?> </code> I know the code is wrong, but php.exe shouldn't crash. I've got the Standard binary distribution for Win32 running as CGI binary from the standard Apache binary distribution. W2K error message: "php-exe - Application Error The instruction at 0x1004cbb3" referenced memory at 0x5b0a0d0a". The memory could not be 'read'. Click OK to terminate the program" Sorry; no gdb backtrace... Thanks for doing great work! --rune ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=13641&edit=1

« previous php.dev (#67844) next »