php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5162 core dump on un-freed mem dump
Submitted: 2000-06-20 23:56 UTC Modified: 2000-09-03 18:22 UTC
From: jjhuff at apptechsys dot com Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 4.0 Latest CVS (20/06/2000) OS: Linux
Private report: No CVE-ID: None
 [2000-06-20 23:56 UTC] jjhuff at apptechsys dot com
The module I'm loading has the line 
emalloc(100);
in the function for ccmfactory_new()
I know I need to efree it.  However, as a test I'm not freeing it.  

At line 551 of main.c t->filename is pointing to invalid memory.
In _emalloc it is getting set to valid memory with valid data...

Let me know i you have any questions...

Attached is my gdb session:
----------------------------------------------------
Starting program: /disk2/home/jjhuff/php/php4/./php 
<?
        //Start the session
        dl("sinaisocketphp.so");
        $fact = ccmfactory_new();
?>
X-Powered-By: PHP/4.0.1-dev
Content-type: text/html


Program received signal SIGSEGV, Segmentation fault.
0x4011672a in _IO_vfprintf (s=0xbffff674, format=0x80f56c0 "%s(%d) :  Freeing 0x%.8lX (%d bytes), script=%s\n", ap=0xbffff788)
    at vfprintf.c:1259
1259    vfprintf.c: No such file or directory.
(gdb) bt
#0  0x4011672a in _IO_vfprintf (s=0xbffff674, format=0x80f56c0 "%s(%d) :  Freeing 0x%.8lX (%d bytes), script=%s\n", ap=0xbffff788)
    at vfprintf.c:1259
#1  0x40123566 in _IO_vsnprintf (string=0xbffff9a8 "", maxlen=512, 
    format=0x80f56c0 "%s(%d) :  Freeing 0x%.8lX (%d bytes), script=%s\n", args=0xbffff784) at vsnprintf.c:129
#2  0x4011cf9a in __snprintf (s=0xbffff9a8 "", maxlen=512, format=0x80f56c0 "%s(%d) :  Freeing 0x%.8lX (%d bytes), script=%s\n")
    at snprintf.c:37
#3  0x805e613 in php_message_handler_for_zend (message=4, data=0x8140db8) at main.c:551
#4  0x80c665e in zend_message_dispatcher (message=4, data=0x8140db8) at zend.c:520
#5  0x80b9716 in shutdown_memory_manager (silent=0, clean_cache=0) at zend_alloc.c:416
#6  0x805e7e0 in php_request_shutdown (dummy=0x0) at main.c:669
#7  0x805dc09 in main (argc=1, argv=0xbffffcd4) at cgi_main.c:682

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-15 07:08 UTC] stas@php.net
Does the problem occur in non-debug mode too?
 [2000-09-03 18:22 UTC] sniper@php.net
No feedback from user.

--Jani
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 09:00:01 2026 UTC