Re: Re: Moved virtual cwd stuff to TSRM
| From: | Olivier Cahagne | Date: | Tue, 05 Sep 2000 19:20:59 +0000 |
| Subject: | Re: Re: Moved virtual cwd stuff to TSRM | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-32227@lists.php.net to get a copy of this message | ||
Hi,
I isolated the bug and tested on different platforms:
The bug appears on NetBSD 1.3.3 (with gcc 2.7.2.2+myc2, no bison) and NetBSD 1.4.2 (with egcs 2.91.60 and bison 1.28).
It does not seem to affect Linux (with egcs 2.91.66 and bison 1.28)
Here's how to reproduce the bug, I compile PHP latest snapshot 200009051045 with the following:
./configure --with-config-file-path=/space/www/etc/httpd/conf/php_cgi \
--enable-discard-path \
--without-gd \
--without-mysql
Then, running php -v (for e.g.) will segfault:
Program received signal SIGSEGV, Segmentation fault.
0x7ee14 in virtual_file_ex (state=0x0,
path=0xefbfcea8 "/usr/space/www/etc/httpd/conf/php_cgi/php.ini",
verify_path=0) at tsrm_virtual_cwd.c:332
332 CWD_STATE_COPY(old_state, state);(gdb) bt #0 0x7ee14 in virtual_file_ex (state=0x0, path=0xefbfcea8 "/usr/space/www/etc/httpd/conf/php_cgi/php.ini", verify_path=0) at tsrm_virtual_cwd.c:332 I can solve this bug in 2 different ways: - compiling without --with-config-file-path=/path/to/ini, php does not find any php.ini and runs "php -v" fine. - deleting php.ini from the path indicated in the --with-config-file-path So, there seems to be a bug in php.ini parsing on NetBSD. I tried many snapshots, re-building them (./cvsclean and ./buildconf), also copying the latest php.ini over the old one. It didn't help.
Can you please compile with --enable-debug? Something seems screwed up here and you don't really have a back trace. Is it compiling with -g? The crash doesn't make much sense if it's coming from expand_filepath() which is what I think but it might be from some other place.-- Olivier.Cahagne@epita.fr