#23711 [Opn->Fbk]: Any script containing a parse_ini_file() call results in a segmentation fault
| From: | derick@php.net | Date: | Tue, 20 May 2003 09:52:33 +0000 |
| Subject: | #23711 [Opn->Fbk]: Any script containing a parse_ini_file() call results in a segmentation fault | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-40019@lists.php.net to get a copy of this message | ||
ID: 23711
Updated by: derick@php.net
Reported By: gavin dot brown at uk dot com, rael at wibble dot org
dot uk
-Status: Open
+Status: Feedback
Bug Type: Reproducible crash
Operating System: Linux
PHP Version: 4.3.2RC3
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2003-05-20 04:49:18] gavin dot brown at uk dot com, rael at wibble dot
org dot uk
changing email address.
------------------------------------------------------------------------
[2003-05-20 04:43:43] gavin dot brown at uk dot com, rael at wibble dot
org dot uk
Any script that contains a call to the parse_ini_file() function
results in a segmentation fault. This is the case for mod_php4 and the
CLI. The scripts used to test this are at
http://jodrell.net/files/parse_ini_file_bug/
Here's what happens when the script is run from a shell:
[root@spoon rael]# /usr/local/bin/php parse_ini_file_demo.php
Date: Tue, 20 May 2003 10:37:09 +0100
This string is printed before parsing.
Segmentation fault (core dumped)
[root@spoon rael]# gdb /usr/local/bin/php core
GNU gdb Red Hat Linux (5.2-2)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i386-redhat-linux"...
Core was generated by `/usr/local/bin/php parse_ini_file_demo.php'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /lib/i686/libm.so.6...done.
Loaded symbols for /lib/i686/libm.so.6
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/i686/libc.so.6...done.
Loaded symbols for /lib/i686/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
#0 0x4011a3cd in __libc_free (mem=0xbfffca4c) at malloc.c:3143
3143 malloc.c: No such file or directory.
in malloc.c
(gdb) bt
#0 0x4011a3cd in __libc_free (mem=0xbfffca4c) at malloc.c:3143
#1 0x0810e798 in _efree (ptr=0xbfffca58)
at /home/stuff/php-4.3.2RC3/Zend/zend_alloc.c:265
#2 0x08108cb2 in zend_file_handle_dtor (fh=0xbfffca20)
at Zend/zend_language_scanner.c:2945
#3 0x0810cd78 in zend_parse_ini_file (fh=0xbfffca20,
unbuffered_errors=0,
ini_parser_cb=0x8094b94 <php_simple_ini_parser_cb>, arg=0x81a9e3c)
at Zend/zend_ini_parser.c:185
#4 0x08094f0e in zif_parse_ini_file (ht=1, return_value=0x81a9e3c,
this_ptr=0x0, return_value_used=1)
at /home/stuff/php-4.3.2RC3/ext/standard/basic_functions.c:2894
#5 0x0812fb88 in execute (op_array=0x81a57cc)
at /home/stuff/php-4.3.2RC3/Zend/zend_execute.c:1606
#6 0x0811d60c in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at /home/stuff/php-4.3.2RC3/Zend/zend.c:886
#7 0x080f6c9c in php_execute_script (primary_file=0xbffff5b0)
at /home/stuff/php-4.3.2RC3/main/main.c:1687
#8 0x08138314 in main (argc=2, argv=0xbffff654)
at /home/stuff/php-4.3.2RC3/sapi/cli/php_cli.c:805
#9 0x400b5657 in __libc_start_main (main=0x81378a0 <main>, argc=2,
ubp_av=0xbffff654, init=0x8060eec <_init>, fini=0x81388c0 <_fini>,
rtld_fini=0x4000dcd4 <_dl_fini>, stack_end=0xbffff64c)
at ../sysdeps/generic/libc-start.c:129
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23711&edit=1