ID: 22215
Comment by: azarah at gentoo dot org
Reported By: phpbug-130203-2 at smayw dot nask dot com
Status: Bogus
Bug Type: Reproducible crash
Operating System: Linux
PHP Version: 4CVS-2003-02-13 (stable) / 5CVS-2003-02-13 (dev)
New Comment:
Note that for NLS (or multibyte) input this patch do not
work.
Previous Comments:
------------------------------------------------------------------------
[2003-10-04 17:17:55] azarah at gentoo dot org
Problem is that zend_ini_open_file_for_scanning() do not
set yyin to the correct handle. Below patch is for latest
php5 cvs.
We have an similar issue with php-4.3.3, although a different
patch will be needed, as things have changed slightly.
Cheers,
MS
----------------------------------
--- php5/Zend/zend_ini_scanner.l 2003-10-04 22:33:28.198665760
+0200
+++ php5.az/Zend/zend_ini_scanner.l 2003-10-04 22:35:00.317661544
+0200
@@ -76,7 +76,13 @@ int zend_ini_open_file_for_scanning(zend
}
init_ini_scanner(TSRMLS_C);
- yyin = fh;
+
+ switch (fh->type) {
+ case ZEND_HANDLE_FP:
+ yyin = fh->handle.fp;
+ break;
+ }
+
yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE
TSRMLS_CC) TSRMLS_CC);
ini_filename = fh->filename;
return SUCCESS;
------------------------------------------------------------------------
[2003-02-18 11:51:25] [EMAIL PROTECTED]
Using the old bison 1.28 fixes this. And it's not really
PHP bug.
------------------------------------------------------------------------
[2003-02-18 11:44:30] [EMAIL PROTECTED]
Then let's wait for a new bison release that solves this issue.
------------------------------------------------------------------------
[2003-02-14 17:00:27] phpbug-130203-2 at smayw dot nask dot com
This should make it into http://www.php.net/anoncvs.php for others to
know, unless the PHP/Zend team is planning a workaround. The page now
says "bison (1.28+)"
Thanks
------------------------------------------------------------------------
[2003-02-14 16:47:34] [EMAIL PROTECTED]
That version is know to cause the crash in PHP. Please downgrade to
1.75 or all the way down to 1.28.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/22215
--
Edit this bug report at http://bugs.php.net/?id=22215&edit=1