# Any intest in PHP 5.1/PDO Memory leaks?

- Thread: https://externals.io/message/15840
- Original archive: https://news-web.php.net/php.internals/15840
- Started by Davey on 2005-04-06T02:24:52+00:00
- Messages: 7
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #15840 — Davey — 2005-04-06T02:24:52+00:00

URL: https://externals.io/message/15840#15840

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

---

## #15853 — Jani Taskinen — 2005-04-06T10:35:36+00:00

URL: https://externals.io/message/15840#15853 · In reply to: #15840

> As Wez knows, there are issues with OSX/PHP 5.0.x/PDO, so on

     What issues?

     --Jani

---

## #15854 — Davey — 2005-04-06T10:49:32+00:00

URL: https://externals.io/message/15840#15854 · In reply to: #15853

It doesn't compile with 5.0.x

But thats nothing to do with the memleaks.

- Davey

Jani Taskinen wrote:
> 
> 
> > […]
> 
> 
>     What issues?
> 
>     --Jani

---

## #15855 — Wez Furlong — 2005-04-06T12:33:33+00:00

URL: https://externals.io/message/15840#15855 · In reply to: #15854

Rubbish.
http://netevil.org/node.php?nid=202 shows how to make it compile.


> It doesn't compile with 5.0.x
> 
> But thats nothing to do with the memleaks.
> 
> - Davey
> 
> Jani Taskinen wrote:
> > […]

---

## #15862 — Davey Shafik — 2005-04-06T13:33:45+00:00

URL: https://externals.io/message/15840#15862 · In reply to: #15855

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:
> Rubbish.
> http://netevil.org/node.php?nid=202 shows how to make it compile.
> 
> 
> 
> > […]

---

## #15877 — Jani Taskinen — 2005-04-06T15:56:24+00:00

URL: https://externals.io/message/15840#15877 · In reply to: #15855

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





> Rubbish.
> http://netevil.org/node.php?nid=202 shows how to make it compile.
>
> 
> > […]

---

## #15878 — Edin Kadribasic — 2005-04-06T16:03:52+00:00

URL: https://externals.io/message/15840#15878 · In reply to: #15877

>      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
