PHP 4.0 Bug #2320: Calling mysql_close() w/o open database crashes Apache
| From: | jmeskill at libertydistribution dot com | Date: | Fri, 17 Sep 1999 21:59:36 +0000 |
| Subject: | PHP 4.0 Bug #2320: Calling mysql_close() w/o open database crashes Apache | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-11045@lists.php.net to get a copy of this message | ||
From: jmeskill@libertydistribution.com
Operating system: RedHat Linux 6.0
PHP version: 4.0 Latest CVS (17/09/1999)
PHP Bug Type: Reproduceable crash
Bug description: Calling mysql_close() w/o open database crashes Apache
Running on Apache 1.3.9 as DSO segfaults when using this script...
<? mysql_close(); ?>
Not a big deal as you should have a db open in order to close it and they close automagically... but
shouldn't it just give an error, and not crash apache? :)
Here is debug info:
(gdb) run -X
Starting program: /usr/sbin/httpd -X
Program received signal SIGSEGV, Segmentation fault.
zendparse () at /home/jmeskill/working/php/php4/./libzend/zend-parser.y:158
(gdb) bt
#0 zendparse () at /home/jmeskill/working/php/php4/./libzend/zend-parser.y:158
#1 0xffffffff in ?? ()
#2 0x2ac80813 in _pcre_match (ht=0, return_value=0x7ffff7a4, list=0x2acfae1c,
plist=0x2acfae48, this_ptr=0x0, global=2147481508) at php_pcre.c:424
#3 0x2acba074 in pcre_study (external_re=0x80e62e8, options=718176056,
errorptr=0x7ffffb14) at study.c:383
#4 0x2ac768d0 in cfg_scan_buffer (base=0x7ffff95c "\002", size=718176056)
at configuration-scanner.c:1574
#5 0x2ac76950 in cfg_scan_bytes (
bytes=0x80e1c24 "ü\e\016\bì\013\016\bdÐ\n\b", len=19)
at configuration-scanner.c:1620
#6 0x2ac74bbd in cfg_get_string (
varname=0x80e1c24 "ü\e\016\bì\013\016\bdÐ\n\b", result=0x0)
at ./configuration-parser.y:112
#7 0x2ac74c0d in cfg_get_string (
varname=0x80e1c24 "ü\e\016\bì\013\016\bdÐ\n\b", result=0x1)
at ./configuration-parser.y:121
#8 0x80542f3 in ap_invoke_handler ()
#9 0x80675e9 in process_request_internal ()
#10 0x806764c in ap_process_request ()
#11 0x805f00e in child_main ()
#12 0x805f19c in make_child ()
#13 0x805f2f9 in startup_children ()
#14 0x805f926 in standalone_main ()
#15 0x80600a3 in main ()
#16 0x2ab27cb3 in __libc_start_main (main=0x805fd6c <main>, argc=2,
argv=0x7ffffb14, init=0x804e884 <_init>, fini=0x8093d6c <_fini>,
rtld_fini=0x2aab5350 <_dl_fini>, stack_end=0x7ffffb0c)
at ../sysdeps/generic/libc-start.c:78
(gdb)