php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74193 Memory leaks appear when using mailparse_msg_create()
Submitted: 2017-03-02 05:00 UTC Modified: -
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: hodieu at gmail dot com Assigned:
Status: Open Package: mailparse (PECL)
PHP Version: 7.0.16 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: hodieu at gmail dot com
New email:
PHP Version: OS:

 

 [2017-03-02 05:00 UTC] hodieu at gmail dot com
Description:
------------
I used the following script to check memory leaks:
<?php
$mime = mailparse_msg_create();
mailparse_msg_free($mime);

echo 'Freed!!' . PHP_EOL;

-------------------
------- Output-----
[root@localhost tmp]# export USE_ZEND_ALLOC=0
[root@localhost tmp]# /usr/local/php/bin/php -d "extension_dir=/root/tmp/php/php-7.0.16/ext/mailparse/modules/" -d "extension=mailparse.so" free.php
Freed!!
Segmentation fault (core dumped)
int(571776)
int(623776)
int(692160)
int(744160)
int(796160)
int(848160)
int(900160)
int(900160)


Expected result:
----------------
After running my script, it doesn't appear memory leaks and segmentation fault.

Actual result:
--------------
Freed!!
Segmentation fault (core dumped)
int(571776)
int(623776)
int(692160)
int(744160)
int(796160)
int(848160)
int(900160)
int(900160)

Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC