Re: efree crashes apache
| From: | Sander Roobol | Date: | Mon, 05 Nov 2001 20:40:54 +0000 |
| Subject: | Re: efree crashes apache | ||
| References: | 1 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-3779@lists.php.net to get a copy of this message | ||
This is not the right group for it. Use PHP-DEV for stuff like this. QA
means Quality Assurance. See qa.php.net for more information about the
QA-Team.
Sander
----- Original Message -----
From: "Arne B. Olsen" <abolsen@online.no.spamremove>
To: <php-qa@lists.php.net>
Sent: Monday, November 05, 2001 7:21 PM
Subject: [PHP-QA] efree crashes apache
> Hi
> I dont know if this is the right group for this, but I'll give it a try :
>
> I'm coding an extension to php, but get a strange problem when using
emalloc
> and efree.
>
> Here is an example:
>
> PHP_FUNCTION(my_test) {
> char *message;
> message = emalloc(2048);
>
> another_func_filling_message(&message);
>
> another_funct_using_message(&message);
>
> /* finished, now we can free it */
>
> efree(message); /* This fails */
>
> }
>
> emalloc works, but when trying to use efree, the httpd child gets an
SIGTERM
> and all instances of httpd stops.
>
> If commenting out the efree call, httpd does not crash, but php sends and
> error message to httpd's error log saying :.... Freeing 0xADDRESS (2048
> bytes), script=....
> which sounds ok...
> Why does'nt it want the efree ?
> I have checked that the pointer (message) is the same as the original
> allocated after the two function calls using it. The two functions does
not
> realloc the pointer....
>
> My php version is 4.0.6, and apache version 1.3.19
>
> Kind regards
> Arne
>
>
>
> --
> PHP Quality Assurance Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-qa-unsubscribe@lists.php.net
> For additional commands, e-mail: php-qa-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>