php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63717 Memory leak in AMQPQueue::declare
Submitted: 2012-12-07 12:00 UTC Modified: 2013-04-17 15:28 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: coodix at gmail dot com Assigned: bkw (profile)
Status: Closed Package: amqp (PECL)
PHP Version: 5.3.19 OS: Linux
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: coodix at gmail dot com
New email:
PHP Version: OS:

 

 [2012-12-07 12:00 UTC] coodix at gmail dot com
Description:
------------
A memory leak appears in method AMQPQueue::declare.
If you need to check queue size in cycle it would be problem.

Test script:
---------------
$is_running = true;
while ($is_running) {
  $message_count = $queue->declare();
  echo "{$message_count} messages in queue";
  usleep(100000);
}

Expected result:
----------------
There should not be any memory leak

Actual result:
--------------
A memory leak appears

Patches

Fix_memory_leak_in_AMQPQueue_declare (last revision 2012-12-07 12:01 UTC by coodix at gmail dot com)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-12-07 18:03 UTC] bkw at codingforce dot com
Thanks for reporting and fixing this!
We have recently moved to github. I took the liberty to rebase your patch onto 
our current master so we can incorporate it into the next release.
PR here: https://github.com/pdezwart/php-amqp/pull/36

Feel free to open more pull requests on https://github.com/pdezwart/php-amqp .
Thanks again!
 [2013-04-17 15:28 UTC] bkw@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: bkw
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 21:01:34 2025 UTC