php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #396 error_log() segfaults
Submitted: 1998-05-21 17:18 UTC Modified: 1998-05-21 20:10 UTC
From: torben at coastnet dot com Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 3.0 Latest CVS OS: Linux 2.0.33 Slackware
Private report: No CVE-ID: None
 [1998-05-21 17:18 UTC] torben at coastnet dot com
The following script segfaults reliably as both apache
module and CGI:

<?php error_log( "Banner bug", 1, "torben@localhost" ) ?>

mail() works fine; using the 4th argument doesn't affect
the problem. The mail gets sent either way.

(gdb) run -X -f conf/httpd.conf
Starting program: /usr/local/etc/apache_1.2.1/src/httpd -X -f conf/httpd.conf

Program received signal SIGSEGV, Segmentation fault.
0x8094a61 in _efree (ptr=0x80d45e3, filename=0x80d5618 "functions/mail.c", lineno=164)
    at alloc.c:162
162             REMOVE_POINTER_FROM_LIST(p);
(gdb) bt
#0  0x8094a61 in _efree (ptr=0x80d45e3, filename=0x80d5618 "functions/mail.c",
    lineno=164) at alloc.c:162
#1  0x80a4470 in _php3_mail (to=0x812b570 "torben@localhost",
    subject=0x80d45e3 "PHP3 error_log message", message=0x812b348 "Banner bug",
    headers=0x0) at functions/mail.c:164
#2  0x809aae7 in _php3_error_log (opt_err=1, message=0x812b348 "Banner bug",
    opt=0x812b570 "torben@localhost", headers=0x0) at functions/basic_functions.c:1339
#3  0x809aa61 in php3_error_log (ht=0x812b190, return_value=0x8101128, list=0x8101138,
    plist=0x8101164) at functions/basic_functions.c:1324
#4  0x80b851c in phpparse () at control_structures_inline.h:901
#5  0x808d750 in php3_parse (yyin=0x81233f0) at main.c:1394
#6  0x808da46 in apache_php3_module_main (r=0x811fa3c, fd=19, display_source_mode=0,
    preprocessed=0) at main.c:1786
#7  0x8069768 in send_php3 ()
#8  0x80697b0 in send_parsed_php3 ()
#9  0x80519c5 in invoke_handler ()
#10 0x8053f9d in process_request_internal ()
#11 0x8053fcd in process_request ()
#12 0x804edb1 in child_main ()
#13 0x804ee97 in make_child ()
#14 0x804f469 in standalone_main ()
#15 0x804f8e8 in main ()
#16 0x804c48b in _start ()
(gdb) 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-05-21 20:10 UTC] zeev
Fixed
 [2014-02-28 17:16 UTC] dsp@php.net
Automatic comment on behalf of pajoye
Revision: http://git.php.net/?p=web/pecl.git;a=commit;h=ea151b2abf27d4aaf6d4e2e99ea3edf654ffdf7a
Log: - Fix #396 - Cleanup the Kingdom (or remove pear thingies ;)
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Jun 27 07:01:41 2019 UTC