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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
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-2019 The PHP Group
All rights reserved.
Last updated: Wed Feb 20 17:01:26 2019 UTC