[php-src] Issue #7883: PHP CLI segafult when INI file is not readable
| From: | provtemp | Date: | Fri, 07 Jan 2022 16:34:44 +0000 |
| Subject: | [php-src] Issue #7883: PHP CLI segafult when INI file is not readable | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-238863@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/7883
Comment Author: provtemp
Introduced by https://github.com/php/php-src/commit/c732ab400af92c54eee47c487a56009f1d79dd5d#diff-3a12521d1fb28a95d8894ccdd98d1ec238b722eb45e8849624b52bd3c276480e
Crashes through https://github.com/php/php-src/blob/90b7bde61507cee1c6b37f153909d72f5b203b8c/main/php_ini.c#L699
```
Program terminated with signal 11, Segmentation fault.
#0 _IO_new_fclose (fp=0x0) at iofclose.c:53
53 if (fp->_IO_file_flags & _IO_IS_FILEBUF)
(gdb) bt
#0 _IO_new_fclose (fp=0x0) at iofclose.c:53
#1 0x000000000077d788 in zend_file_handle_dtor (fh=fh@entry=0x7888caf007b0) at
/usr/src/debug/php-8.1.1/Zend/zend_stream.c:217
#2 0x000000000077df80 in zend_destroy_file_handle (file_handle=file_handle@entry=0x7888caf007b0) at
/usr/src/debug/php-8.1.1/Zend/zend_stream.c:273
#3 0x00000000006b0c1c in php_init_config () at /usr/src/debug/php-8.1.1/main/php_ini.c:699
```