Reproducible zend_execute trap on Windows

From: Date: Wed, 15 Mar 2000 13:54:46 +0000
Subject: Reproducible zend_execute trap on Windows
Groups: php.version4 
Request: Send a blank email to php-version4+get-12160@lists.php.net to get a copy of this message
After doing a bit of development on Linux, I went back to regression test my changes on Windows. Every script trapped. Simplifying the scripts and eliminating all other variables, I found that the trap occurred when compiled for CGI with no extensions, and even with scripts with no logic. Tracing the execution on both Linux and Win32, I found where the path differed. Below are the changes required to bring them both in line. I don't know enough about Zend internals to know if these are the right fixes, so instead of committing them straight-away, I'm posting it here. --- d:/cvs/Zend/zend_execute.c Sat Mar 11 10:59:00 2000 +++ zend_execute.c Wed Mar 15 08:37:36 2000 @@ -987,9 +987,7 @@ void execute(zend_op_array *op_array ELS_DC) { zend_op *opline = op_array->opcodes; -#if SUPPORT_INTERACTIVE zend_op *end = op_array->opcodes + op_array->last; -#endif zend_function_state function_state; zend_function *fbc=NULL; /* Function Being Called */ object_info object = {NULL}; @@ -1032,11 +1030,7 @@ } } -#if SUPPORT_INTERACTIVE while (opline<end) { -#else - while (1) { -#endif switch(opline->opcode) { case ZEND_ADD: EG(binary_op) = add_function; @@ -2360,8 +2354,6 @@ } #if SUPPORT_INTERACTIVE op_array->last_executed_op_number = opline-op_array->opcodes; - free_alloca(Ts); -#else - zend_error(E_ERROR,"Arrived at end of main loop which shouldn't happen"); #endif + free_alloca(Ts); } - Sam Ruby

« previous php.version4 (#12160) next »