Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73522 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56980 invoked from network); 2 Apr 2014 15:21:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Apr 2014 15:21:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=jakub.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=jakub.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.42 as permitted sender) X-PHP-List-Original-Sender: jakub.php@gmail.com X-Host-Fingerprint: 209.85.220.42 mail-pa0-f42.google.com Received: from [209.85.220.42] ([209.85.220.42:38807] helo=mail-pa0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 61/C0-52525-EFA2C335 for ; Wed, 02 Apr 2014 10:21:34 -0500 Received: by mail-pa0-f42.google.com with SMTP id fb1so345442pad.1 for ; Wed, 02 Apr 2014 08:21:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=elH6ZvUUrEIo9gcKm554MJy35WBaDZQX9b6iz0xj0BE=; b=syOxzGC3pNIiMzndB6ihPBcCsBuiaBkSR1pGTUg3YmY4N12rZFM1+5U0iYdOIw7Asm loNaRUHTonQ4urLHVdtroGZQw6ox0L4nElxDFp/K+dC7WFza3tsH9/HLa7Y/6I6oVs3J uEmcwYzkVMrUr7SYdIkSb+WOi8/jDXI9f+LwOoVTTO/CD4fRp0WgBJZY6JFw/wPJLe34 zBX5nVNkiJ2X+j8dijhzFJfZVLTrnqjUWKgfVhkYvVXrQ/xo+IbQZOw0OPePxUpGtawb seCazP2QAWfuVk48I6SLnlQBcfmcVQiS+JQOapAzf9+gwaMUZ/CErNxRefj7QLca7DYK M5dg== MIME-Version: 1.0 X-Received: by 10.68.252.165 with SMTP id zt5mr716770pbc.17.1396452091193; Wed, 02 Apr 2014 08:21:31 -0700 (PDT) Sender: jakub.php@gmail.com Received: by 10.68.41.170 with HTTP; Wed, 2 Apr 2014 08:21:31 -0700 (PDT) In-Reply-To: <48f9daf10cfb599cba809b100ef51e9c@jesej.si> References: <48f9daf10cfb599cba809b100ef51e9c@jesej.si> Date: Wed, 2 Apr 2014 16:21:31 +0100 X-Google-Sender-Auth: w4cKf7VbXrgsYaHUYphmLtis0Ss Message-ID: To: Kajetan Dolinar Cc: Internals Content-Type: multipart/alternative; boundary=047d7b163827d7713604f610d64c Subject: Re: Re: [PHP-DEV] Fwd: zend_std_get_method : Address 0xffffffff is not stack'd, malloc'd or (recently) free'd From: bukka@php.net (Jakub Zelenka) --047d7b163827d7713604f610d64c Content-Type: text/plain; charset=ISO-8859-1 On Wed, Apr 2, 2014 at 8:42 AM, Kajetan Dolinar wrote: > Hi Johannes, Stas > > Please find the code with the explanation of how to reproduce the fault > on the following link: https://github.com/kdolinar/hypx-zend-bugcase > > The main Zend PHP extension logic for the classes is in src/hypx.c. > Much obliged for your opinion. Thanks. > > Kajetan > > ==== Some more info ==== > > On my machine, uname -a says > > Linux machine 3.4.6-2.10-desktop #1 SMP PREEMPT Wed Sep 25 08:50:55 CEST > 2013 i686 i686 i386 GNU/Linux > > cat /etc/os-release says > > NAME=openSUSE > VERSION="12.2 (Mantis)" > VERSION_ID="12.2" > PRETTY_NAME="openSUSE 12.2 (Mantis) (i586)" > ID=opensuse > ANSI_COLOR="0;32" > CPE_NAME="cpe:/o:opensuse:opensuse:12.2" > > phpize says > > PHP Api Version: 20090626 > Zend Module Api No: 20090626 > Zend Extension Api No: 220090626 > > and php --version says > > PHP 5.3.15 (cli) > Copyright (c) 1997-2012 The PHP Group > Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies > > Please come back to me if you need anything more ... > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > Hi, fixed: https://gist.github.com/bukka/9936176 The main problem was that you are trying to save return_value to static variable and then re-use it ( https://github.com/kdolinar/hypx-zend-bugcase/blob/master/src/hypx.c#L302 ) That won't work because of GC (value can be freed in the meantime). There were also some memory leaks and missing TSRMLS that I fixed. Compare the the gist file and you will see that. I fixed just this case so the index.php works. However there might be more similar case that you need to check... Jakub --047d7b163827d7713604f610d64c--