Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:25611 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47839 invoked by uid 1010); 11 Sep 2006 16:31:28 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 47823 invoked from network); 11 Sep 2006 16:31:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Sep 2006 16:31:27 -0000 Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 80.74.107.235 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from [80.74.107.235] ([80.74.107.235:35736] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8C/AB-02095-A5F85054 for ; Mon, 11 Sep 2006 12:31:27 -0400 Received: (qmail 1650 invoked from network); 11 Sep 2006 16:30:06 -0000 Received: from localhost (HELO ?127.0.0.1?) (127.0.0.1) by localhost with SMTP; 11 Sep 2006 16:30:06 -0000 Message-ID: <45058F54.30706@zend.com> Date: Mon, 11 Sep 2006 09:31:16 -0700 Organization: Zend Technologies User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: Brian Fertig CC: internals@lists.php.net References: <27.89.02095.A8A55054@pb1.pair.com> <45055FF0.4010206@schlueters.de> <70.2C.02095.91365054@pb1.pair.com> In-Reply-To: <70.2C.02095.91365054@pb1.pair.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] SAPI EMBED Problems From: stas@zend.com (Stanislav Malyshev) >>> I wrote an embedded application that can execute php scripts. >>> When the script exits and I call the php_embed_shutdown() function >>> it crashes. Can someone explain to me how I can keep this from >>> happening? Without looking into the code, crash on shutdown frequently hints on one of the two: 1. Memory corruption 2. applying efree() to a memory block that was result of malloc() or was not allocated. This includes putting malloc'ed or non-allocated strings into zvals, etc. I would suggest to build PHP with --enable-debug and see if memory manager has something to say. Another idea would be to use valgrind if you are running on supported system or analogous tool if you run on system where valgrind does not work.