php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72062 msg_send may produce a memory leak
Submitted: 2016-04-20 08:41 UTC Modified: 2017-01-09 06:39 UTC
From: 77676182 at qq dot com Assigned: krakjoe (profile)
Status: Closed Package: Semaphore related
PHP Version: 7.0.6RC1 OS: Ubuntu 14.04
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: 77676182 at qq dot com
New email:
PHP Version: OS:

 

 [2016-04-20 08:41 UTC] 77676182 at qq dot com
Description:
------------
# sapi/cli/php -v
PHP 7.0.6RC1 (cli) (built: Apr 20 2016 16:16:50) ( ZTS DEBUG )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies

php was configured with:
./configure --disable-all --enable-debug --enable-maintainer-zts --enable-sysvmsg


Test script:
---------------
<?php
error_reporting(0);
$mq  = msg_queue_get(0x1234);
$err = "hello";
$ret = msg_send($mq, 1, str_repeat("a", 1024000), false, true, $err);
if (!$ret) {
    printf("msg_send failed(%d)!\n", $err);
}

Expected result:
----------------
msg_send failed(22)!

Actual result:
--------------
msg_send failed(22)!
[Wed Apr 20 16:38:41 2016]  Script:  '/root/github/php-src/test.php'
/root/github/php-src/Zend/zend_string.h(121) :  Freeing 0x7F3430602E00 (32 bytes), script=/root/github/php-src/test.php
=== Total 1 memory leaks detected ===

Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-09 06:39 UTC] krakjoe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: krakjoe
 [2017-01-09 06:39 UTC] krakjoe@php.net
The github PR was closed (no reason given).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 06:01:30 2024 UTC