php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46543 ibase_trans() memory leaks when using wrong parameters
Submitted: 2008-11-11 13:07 UTC Modified: 2008-11-11 13:31 UTC
From: felipe@php.net Assigned: felipe (profile)
Status: Closed Package: InterBase related
PHP Version: 5.2CVS-2008-11-11 (snap) OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: felipe@php.net
New email:
PHP Version: OS:

 

 [2008-11-11 13:07 UTC] felipe@php.net
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 ===


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-11-11 13:31 UTC] felipe@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 11:01:29 2024 UTC