Any intest in PHP 5.1/PDO Memory leaks?

php.internals

Davey

21 years ago
Hey, I have a ORM wrapper for PDO which I've been working on for several weeks. Whilst all of my .phpt tests work just fine on PHP 5.0.4 (or snaps, depends on my mood) with snaps PDO binaries on WinXP. As Wez knows, there are issues with OSX/PHP 5.0.x/PDO, so on Rasmus' advice I went with current CVS HEAD PHP. When I ran the tests on OSX, I got a bunch of failures, now when I went to test why I got a segfault. So, I compiled a --enable-debug build and now get plenty of memory leaks. Is this interesting to anyone? The following looks like the most serious, but I don't have a clue about these things :) /Library/WebServer/public_html/php-cvs/php-src/ext/pdo/pdo_stmt.c(830) : Freeing 0x01FF3658 (16 bytes), script=/Library/WebServer/public_html/cerebralcortex/packages/Crtx_DB/tests/Crtx_DB_DataObject/Find_No_ID.php Last leak repeated 179 times /Library/WebServer/public_html/php-cvs/php-src/ext/pdo/pdo_stmt.c(471) : Freeing 0x01FF3398 (13 bytes), script=/Library/WebServer/public_html/cerebralcortex/packages/Crtx_DB/tests/Crtx_DB_DataObject/Find_No_ID.php Last leak repeated 179 times === Total 360 memory leaks detected === I have 15 different tests failing with mem leaks. - Davey

Jani Taskinen

21 years ago
On Tue, 5 Apr 2005, Davey wrote:
> As Wez knows, there are issues with OSX/PHP 5.0.x/PDO, so on
What issues? --Jani

Davey

21 years ago
It doesn't compile with 5.0.x But thats nothing to do with the memleaks. - Davey Jani Taskinen wrote:

Wez Furlong

21 years ago
Rubbish. http://netevil.org/node.php?nid=202 shows how to make it compile. On Apr 6, 2005 6:49 AM, Davey <davey@php.net> wrote:

Davey

21 years ago
Thats right, theres just bugs in the currect PECL releases and I couldn't get CVS to compile with 5.0.x. Thinking on it now, CVS HEAD is probably 5.1 only right? and theres a 5.0.x branch? ::looks:: Regardless, are these memory leak reports of any use? - Davey Wez Furlong wrote:

Jani Taskinen

21 years ago
I think it would work just fine as shared too with HEAD.. Someone with Macosx should try it out. (first you need to remove the silly AC_MSG_ERROR() from ext/pdo/config.m4..) --Jani On Wed, 6 Apr 2005, Wez Furlong wrote:

Edin Kadribasic

21 years ago
On Wednesday 06 April 2005 17:56, Jani Taskinen wrote:
> I think it would work just fine as shared too with HEAD.. > Someone with Macosx should try it out. > (first you need to remove the silly AC_MSG_ERROR() from > ext/pdo/config.m4..)
Wrong, pdo drivers need to link against pdo, and you cannot link against a .so's on OSX (it cannot be lib and loadable module at the same time). So pdo itself cannot be compiled shared on OSX. Edin