#35716 [NEW]: parse_ini crashes trying to parse flie

From: Date: Fri, 16 Dec 2005 22:05:15 +0000
Subject: #35716 [NEW]: parse_ini crashes trying to parse flie
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-90580@lists.php.net to get a copy of this message
From: john@php.net Operating system: RHAS3 (in Vmware) PHP version: 5.1.1 PHP Bug Type: Reproducible crash Bug description: parse_ini crashes trying to parse flie Description: ------------ Okay, so PHP is segfaulting for no apparent reason trying to parse a simple .ini file... bt follows... Breaks with PHP 5.0.4 and 5.1.1 Reproduce code: --------------- Can't really provide a small snippet, part of framework app... BT: #0 virtual_file_ex (state=0xbf6001b8, path=0x8c25c84 "/home/adteractive/php_verticals_v2/education/commons/configs/DefaultEdu/flow.ini", verify_path=0, use_realpath=1) at /root/php-5.0.4/TSRM/tsrm_virtual_cwd.c:296 #1 0xb7161758 in expand_filepath ( filepath=0x8c25c84 "/home/adteractive/php_verticals_v2/education/commons/configs/DefaultEdu/flow.ini", real_path=0x0) at /root/php-5.0.4/main/fopen_wrappers.c:538 #2 0xb716e0ed in _php_stream_fopen ( filename=0x8c25c84 "/home/adteractive/php_verticals_v2/education/commons/configs/DefaultEdu/flow.ini", mode=0xb71cc5d1 "rb", opened_path=0xbf6023f8, options=133) at /root/php-5.0.4/main/streams/plain_wrapper.c:844 #3 0xb716e891 in _php_stream_fopen_with_path ( filename=0x8c25c84 "/home/adteractive/php_verticals_v2/education/commons/configs/DefaultEdu/flow.ini", mode=0xb71cc5d1 "rb", path=0x817c250 "/home/adteractive/php_framework_v2-1/libs/PEAR/", opened_path=0xbf6023f8, options=133) at /root/php-5.0.4/main/streams/plain_wrapper.c:1259 #4 0xb716bb1e in _php_stream_open_wrapper_ex ( path=0x8c25c84 "/home/adteractive/php_verticals_v2/education/commons/configs/DefaultEdu/flow.ini", mode=0xb71cc5d1 "rb", options=141, opened_path=0x85, context=0x0) at /root/php-5.0.4/main/streams/streams.c:1657 #5 0xb715cdb4 in php_stream_open_for_zend ( #6 0xb7195813 in zend_stream_open ( filename=0x8c25c84 "/home/adteractive/php_verticals_v2/education/commons/configs/DefaultEdu/flow.ini", handle=0xbf6023f0) at /root/php-5.0.4/Zend/zend_stream.c:41 #7 0xb71958cc in zend_stream_fixup (file_handle=0xbf6023f0) at /root/php-5.0.4/Zend/zend_stream.c:56 #8 0xb717924c in zend_ini_open_file_for_scanning (fh=0xbf6023f0) at Zend/zend_ini_scanner.c:550 #9 0xb7178c80 in zend_parse_ini_file (fh=0xbf6023f0, unbuffered_errors=0 '\0', ini_parser_cb=0, arg=0x0) at Zend/zend_ini_parser.c:171 #10 0xb71117ff in zif_parse_ini_file (ht=0, return_value=0x8c25d0c, this_ptr=0x0, return_value_used=1) at /root/php-5.0.4/ext/standard/basic_functions.c:3103 Expected result: ---------------- Not to segfault.... Actual result: -------------- Boom. -- Edit bug report at http://bugs.php.net/?id=35716&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35716&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35716&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35716&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=35716&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35716&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35716&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=35716&r=needscript Try newer version: http://bugs.php.net/fix.php?id=35716&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35716&r=support Expected behavior: http://bugs.php.net/fix.php?id=35716&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35716&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35716&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35716&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35716&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35716&r=dst IIS Stability: http://bugs.php.net/fix.php?id=35716&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35716&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35716&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35716&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=35716&r=mysqlcfg

« previous php.bugs (#90580) next »