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: 2020-06-14 04:22 UTC
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: cmb (profile)
Status: No Feedback Package: mailparse (PECL)
PHP Version: 7.0.16 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
6 - 2 = ?
Subscribe to this entry?

 
 [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

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-06-04 07:46 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2020-06-04 07:46 UTC] cmb@php.net
I have not been able to reproduce the reported segfaults and
memory leaks with mailparse 3.1.0.  Do these still happen to you
with any of the actively supported PHP versions[1]?

[1] <https://www.php.net/supported-versions.php>
 [2020-06-14 04:22 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 03:01:32 2024 UTC