From: [EMAIL PROTECTED]
Operating system:
PHP version: 5.2CVS-2008-11-11 (snap)
PHP Bug Type: InterBase related
Bug description: ibase_trans() memory leaks when using wrong parameters
Description:
------------
See below.
Reproduce code:
---------------
ibase_trans(1);
ibase_trans();
ibase_trans('foo');
ibase_trans(fopen(__FILE__, 'r'));
$x = ibase_connect('/home/felipe/teste.fdb', 'foo', 'bar');
ibase_trans(1, 2, $x, $x, 3);
Expected result:
----------------
Warning: ibase_trans(): no Firebird/InterBase link resource supplied in
/home/felipe/dev/bug.php on line 3
Warning: ibase_trans(): no Firebird/InterBase link resource supplied in
/home/felipe/dev/bug.php on line 4
Warning: ibase_trans(): no Firebird/InterBase link resource supplied in
/home/felipe/dev/bug.php on line 5
Warning: ibase_trans(): supplied resource is not a valid
Firebird/InterBase link resource in /home/felipe/dev/bug.php on line 6
Actual result:
--------------
Warning: ibase_trans(): no Firebird/InterBase link resource supplied in
/home/felipe/dev/bug.php on line 3
Warning: ibase_trans(): no Firebird/InterBase link resource supplied in
/home/felipe/dev/bug.php on line 4
Warning: ibase_trans(): no Firebird/InterBase link resource supplied in
/home/felipe/dev/bug.php on line 5
Warning: ibase_trans(): supplied resource is not a valid
Firebird/InterBase link resource in /home/felipe/dev/bug.php on line 6
[Tue Nov 11 11:05:43 2008] Script: '../bug.php'
/home/felipe/dev/php6/ext/interbase/interbase.c(1194) : Freeing
0x0897BF38 (8 bytes), script=../bug.php
/home/felipe/dev/php6/Zend/zend_alloc.c(2448) : Actual location (location
was relayed)
Last leak repeated 3 times
[Tue Nov 11 11:05:43 2008] Script: '../bug.php'
/home/felipe/dev/php6/ext/interbase/interbase.c(1209) : Freeing
0x0897BF70 (8 bytes), script=../bug.php
/home/felipe/dev/php6/Zend/zend_alloc.c(2448) : Actual location (location
was relayed)
[Tue Nov 11 11:05:43 2008] Script: '../bug.php'
/home/felipe/dev/php6/ext/interbase/interbase.c(1200) : Freeing
0x0897C250 (4 bytes), script=../bug.php
/home/felipe/dev/php6/Zend/zend_alloc.c(2448) : Actual location (location
was relayed)
[Tue Nov 11 11:05:43 2008] Script: '../bug.php'
/home/felipe/dev/php6/ext/interbase/interbase.c(1208) : Freeing
0x0897C530 (12 bytes), script=../bug.php
/home/felipe/dev/php6/Zend/zend_alloc.c(2448) : Actual location (location
was relayed)
=== Total 7 memory leaks detected ===
--
Edit bug report at http://bugs.php.net/?id=46543&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=46543&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=46543&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=46543&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=46543&r=fixedcvs
Fixed in CVS and need be documented:
http://bugs.php.net/fix.php?id=46543&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=46543&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=46543&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=46543&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=46543&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=46543&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=46543&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=46543&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=46543&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=46543&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46543&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=46543&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=46543&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=46543&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=46543&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=46543&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=46543&r=mysqlcfg