php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56104 apc.optimization=1 SEGV
Submitted: 2004-06-19 02:44 UTC Modified: 2004-06-23 12:32 UTC
From: xuefer at 21cn dot com Assigned:
Status: Closed Package: APC (PECL)
PHP Version: 4.3.3 OS: linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: xuefer at 21cn dot com
New email:
PHP Version: OS:

 

 [2004-06-19 02:44 UTC] xuefer at 21cn dot com
Description:
------------
the following script SEGV coredump with apc.optimization=1

Reproduce code:
---------------
<?php

class A
{
    function a1()
    {
        "$this->a a";
    }

};

class B extends A
{
}

?>



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-06-23 12:32 UTC] xuefer at 21cn dot com
this bug is fixed by the patch of:
http://pecl.php.net/bugs/bug.php?id=1678

Index: apc_optimizer.c
===================================================================
RCS file: /repository/pecl/apc/apc_optimizer.c,v
retrieving revision 3.24
diff -u -r3.24 apc_optimizer.c
--- apc_optimizer.c	20 Jul 2003 00:07:02 -0000	3.24
+++ apc_optimizer.c	23 Jun 2004 16:29:21 -0000
@@ -139,7 +139,10 @@
                 if (ops[j].opcode != ZEND_NOP) {
                     break;
                 }
-                j++;
+                if (++ j >= num_ops) {
+                    j --;
+                    break;
+                }
             }
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 09:01:28 2024 UTC