Re: SAPI EMBED Problems

From: Date: Mon, 11 Sep 2006 16:31:16 +0000
Subject: Re: SAPI EMBED Problems
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-25611@lists.php.net to get a copy of this message
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.

« previous php.internals (#25611) next »