]> granicus.if.org Git - php/commitdiff
MFH: - Fixed bug #28839 (SIGSEGV in interactive mode (php -a)).
authorfoobar <sniper@php.net>
Sun, 3 Apr 2005 21:57:06 +0000 (21:57 +0000)
committerfoobar <sniper@php.net>
Sun, 3 Apr 2005 21:57:06 +0000 (21:57 +0000)
MFH:   (kameshj at fastmail dot fm)

NEWS
Zend/zend_execute_API.c

diff --git a/NEWS b/NEWS
index e26b23747779706faa5498f5b66f8e1511a0f188..362fc474ad5b1126e432ba205b9496584b377e55 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,8 @@ PHP                                                                        NEWS
 ?? ??? 2005, PHP 5.0.5
 - Fixed bug #32530 (chunk_split() does not append endstr if chunklen is  
   longer then the original string). (Ilia)
+- Fixed bug #28839 (SIGSEGV in interactive mode (php -a)).
+  (kameshj at fastmail dot fm)
 
 31 Mar 2005, PHP 5.0.4
 - Added SNMPv2 support. (harrie)
index b2b459e4964bd6ac66215e4d9e4f0bc700542cd9..3d31332b6e48fa137f535f9bc7eb32c2d9236445 100644 (file)
@@ -1081,6 +1081,17 @@ void execute_new_code(TSRMLS_D)
                        opline->op2.u.constant.is_ref = 1;
                        opline->op2.u.constant.refcount = 2;
                }
+               switch (opline->opcode) {
+                       case ZEND_JMP:
+                               opline->op1.u.jmp_addr = &CG(active_op_array)->opcodes[opline->op1.u.opline_num];
+                               break;
+                       case ZEND_JMPZ:
+                       case ZEND_JMPNZ:
+                       case ZEND_JMPZ_EX:
+                       case ZEND_JMPNZ_EX:
+                               opline->op2.u.jmp_addr = &CG(active_op_array)->opcodes[opline->op2.u.opline_num];
+                               break;
+               }
                opline->handler = zend_opcode_handlers[opline->opcode];
                opline++;
        }