php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40374 Double free during shutdown
Submitted: 2007-02-06 17:08 UTC Modified: 2007-02-06 18:02 UTC
From: andrey@php.net Assigned:
Status: Closed Package: Reproducible crash
PHP Version: 6CVS-2007-02-06 (CVS) OS: Linux/Debian amd64
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: andrey@php.net
New email:
PHP Version: OS:

 

 [2007-02-06 17:08 UTC] andrey@php.net
Description:
------------
On my amd64 the following code snippet lead to a warning from glibc, probably double free:
andrey@whirlpool:~/dev/php6$ ./php mysqlnd_local_infile2.php
string(16) "/tmp/test_RS93D8"
done!*** glibc detected *** free(): invalid pointer: 0x00000000007ca1c4 ***
Aborted


Reproduce code:
---------------
<?php
    $file = tempnam(sys_get_temp_dir(), "test_");
    var_dump($file);
    $fp = fopen($file, "w");
    fwrite($fp, "test");
    fclose($fp);

    print "done!";
?>

Expected result:
----------------
string(16) "/tmp/test_RS93D8"
done

Actual result:
--------------
string(16) "/tmp/test_RS93D8"
done!*** glibc detected *** free(): invalid pointer: 0x00000000007ca1c4 ***
Aborted

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-02-06 17:23 UTC] tony2001@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2007-02-06 17:36 UTC] tony2001@php.net
Nevermind, it's fixed in CVS.
 [2007-02-06 18:02 UTC] andrey@php.net
Ah, yes, I just synced.

Thanks!
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 13 10:01:27 2025 UTC