ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-Dev
php-Dev
#23711 [NEW]: Any script containing a parse_ini_file() call results in a segmentation fault
by gavin dot brown at uk dot com, colin at wibble dot org dot uk other posts by this author
May 20 2003 9:43AM messages near this date
#23713 [Opn->Bgs]: printf, sprintf, round... (bug?) | #23711 [Csd]: Any script containing a parse_ini_file() call results in a segmentation fault
From:             gavin dot brown at uk dot com, colin at wibble dot org dot uk
Operating system: Linux
PHP version:      4.3.2RC3
PHP Bug Type:     Reproducible crash
Bug description:  Any script containing a parse_ini_file() call results in a segmentation fa
ult

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 bug report at http://bugs.php.net/?id=23711&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=23711&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=23711&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=23711&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=23711&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=23711&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=23711&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=23711&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=23711&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=23711&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=23711&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23711&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=23711&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=23711&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=23711&r=gnused
Thread:
gavin dot brown at uk dot com, colin at wibble dot org dot uk
gavin dot brown at uk dot com, colin at wibble dot org dot uk

gavin dot brown at uk dot com, rael at wibble dot org dot uk

rael at wibble dot org dot duk

gavin dot brown at uk dot com, rael at wibble dot org dot uk

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved