Bug #78592 [Asn->Csd]: filter related extension cause Segmentation fault
| From: | cmb@php.net | Date: | Mon, 05 Jul 2021 08:40:49 +0000 |
| Subject: | Bug #78592 [Asn->Csd]: filter related extension cause Segmentation fault | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-234800@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78592&edit=1
ID: 78592
Updated by: cmb@php.net
Reported by: john dot royer at gmail dot com
Summary: filter related extension cause Segmentation fault
-Status: Assigned
+Status: Closed
Type: Bug
Package: JSON related
Operating System: Linux (Ubuntu 18.04)
PHP Version: 7.3.9
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Thanks for the swift reply!
Previous Comments:
------------------------------------------------------------------------
[2021-07-04 22:58:45] john dot royer at gmail dot com
There is no more error in supported PHP versions.
I thinks this issue can be closed.
Thanks
------------------------------------------------------------------------
[2021-07-02 13:51:12] cmb@php.net
Is this still an issue with any of the actively supported PHP
versions[1]?
[1] <https://www.php.net/supported-versions.php>
------------------------------------------------------------------------
[2019-09-26 10:33:40] john dot royer at gmail dot com
I think this may not PHP's error.
Please let me know if you need more information. Thanks.
------------------------------------------------------------------------
[2019-09-26 10:31:52] john dot royer at gmail dot com
I also get the segment fault issue in 7.2.22.
phpbrew build script: phpbrew install -j 8 7.2.22 as 72 +default +mysql +pdo +filter
$ php -v
PHP 7.2.22 (cli) (built: Sep 26 2019 16:54:38) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
fileinfo
filter
hash
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlwriter
xslzip
zlib
$ phpunit
... Run by vendor/bin/phpunit ...
PHPUnit 7.5.15 by Sebastian Bergmann and contributors.
............................................................... 63 / 304 ( 20%)
................................Segmentation fault (core dumped)
//===============================================
$ gdb
which php core-php.730
GNU gdb (Ubuntu 8.1-0ubuntu3.1) 8.1.0.20180409-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/zero/.phpbrew/php/72/bin/php...done.
[New LWP 730]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `php /home/zero/devel/boltics/vendor/bin/phpunit'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 zend_mm_alloc_small (bin_num=<optimized out>, size=56, heap=0x7f9626400040) at
/home/zero/.phpbrew/build/72/Zend/zend_alloc.c:1275
1275 heap->free_slot[bin_num] = p->next_free_slot;
(gdb)
#0 zend_mm_alloc_small (bin_num=<optimized out>, size=56, heap=0x7f9626400040) at
/home/zero/.phpbrew/build/72/Zend/zend_alloc.c:1275
#1 zend_mm_alloc_heap (size=56, heap=0x7f9626400040) at
/home/zero/.phpbrew/build/72/Zend/zend_alloc.c:1346
#2 _emalloc (size=size@entry=56) at /home/zero/.phpbrew/build/72/Zend/zend_alloc.c:2435
#3 0x000055db1ccde341 in zend_string_alloc (persistent=0, len=28) at
/home/zero/.phpbrew/build/72/Zend/zend_string.h:134
#4 php_json_scan (s=s@entry=0x7ffc9a322540) at
/home/zero/.phpbrew/build/72/ext/json/json_scanner.c:593
#5 0x000055db1ccdcab7 in php_json_yylex (value=0x7ffc9a321060, parser=0x7ffc9a322540) at
/home/zero/.phpbrew/build/72/ext/json/json_parser.tab.c:1905
#6 php_json_yyparse (parser=parser@entry=0x7ffc9a322540) at
/home/zero/.phpbrew/build/72/ext/json/json_parser.tab.c:1367
#7 0x000055db1ccd98a1 in php_json_decode_ex (return_value=return_value@entry=0x7f9626423c20,
str=str@entry=0x7f9621042018 "{\n \"name\": \"boltics/core\",\n
\"description\": \"A secert project\",\n \"keywords\":
[\"cms\", \"plattform\", \"shopify\"],\n \"license\":
\"\",\n \"type\": \"project\",\n \"require\": {\n
\"php\": \">=7.1.3"..., str_len=<optimized out>,
options=<optimized out>,
depth=<optimized out>) at /home/zero/.phpbrew/build/72/ext/json/json.c:216
#8 0x000055db1ccd99f5 in zif_json_decode (execute_data=0x7f9626423d30, return_value=0x7f9626423c20)
at /home/zero/.phpbrew/build/72/ext/json/json.c:306
#9 0x000055db1cfaaca0 in ZEND_DO_FCALL_BY_NAME_SPEC_RETVAL_USED_HANDLER () at
/home/zero/.phpbrew/build/72/Zend/zend_vm_execute.h:816
#10 execute_ex (ex=0x38) at /home/zero/.phpbrew/build/72/Zend/zend_vm_execute.h:59762
#11 0x000055db1cfac579 in zend_execute (op_array=op_array@entry=0x7f96264802a0, return_value=0x0,
return_value@entry=0x7f96253eca20)
at /home/zero/.phpbrew/build/72/Zend/zend_vm_execute.h:63776
#12 0x000055db1cefbd22 in zend_execute_scripts (type=type@entry=8, retval=0x7f96253eca20,
retval@entry=0x0, file_count=641874736, file_count@entry=3)
at /home/zero/.phpbrew/build/72/Zend/zend.c:1498
#13 0x000055db1ce97d50 in php_execute_script (primary_file=0x7ffc9a324cf0) at
/home/zero/.phpbrew/build/72/main/main.c:2599
#14 0x000055db1cfae98c in do_cli (argc=2, argv=0x55db1f559490) at
/home/zero/.phpbrew/build/72/sapi/cli/php_cli.c:1011
#15 0x000055db1cbe556b in main (argc=2, argv=0x55db1f559490) at
/home/zero/.phpbrew/build/72/sapi/cli/php_cli.c:1403
(gdb)
#0 zend_mm_alloc_small (bin_num=<optimized out>, size=56, heap=0x7f9626400040) at
/home/zero/.phpbrew/build/72/Zend/zend_alloc.c:1275
#1 zend_mm_alloc_heap (size=56, heap=0x7f9626400040) at
/home/zero/.phpbrew/build/72/Zend/zend_alloc.c:1346
#2 _emalloc (size=size@entry=56) at /home/zero/.phpbrew/build/72/Zend/zend_alloc.c:2435
#3 0x000055db1ccde341 in zend_string_alloc (persistent=0, len=28) at
/home/zero/.phpbrew/build/72/Zend/zend_string.h:134
#4 php_json_scan (s=s@entry=0x7ffc9a322540) at
/home/zero/.phpbrew/build/72/ext/json/json_scanner.c:593
#5 0x000055db1ccdcab7 in php_json_yylex (value=0x7ffc9a321060, parser=0x7ffc9a322540) at
/home/zero/.phpbrew/build/72/ext/json/json_parser.tab.c:1905
#6 php_json_yyparse (parser=parser@entry=0x7ffc9a322540) at
/home/zero/.phpbrew/build/72/ext/json/json_parser.tab.c:1367
#7 0x000055db1ccd98a1 in php_json_decode_ex (return_value=return_value@entry=0x7f9626423c20,
str=str@entry=0x7f9621042018 "{\n \"name\": \"boltics/core\",\n
\"description\": \"A secert project\",\n \"keywords\":
[\"cms\", \"plattform\", \"shopify\"],\n \"license\":
\"\",\n \"type\": \"project\",\n \"require\": {\n
\"php\": \">=7.1.3"..., str_len=<optimized out>,
options=<optimized out>,
depth=<optimized out>) at /home/zero/.phpbrew/build/72/ext/json/json.c:216
#8 0x000055db1ccd99f5 in zif_json_decode (execute_data=0x7f9626423d30, return_value=0x7f9626423c20)
at /home/zero/.phpbrew/build/72/ext/json/json.c:306
#9 0x000055db1cfaaca0 in ZEND_DO_FCALL_BY_NAME_SPEC_RETVAL_USED_HANDLER () at
/home/zero/.phpbrew/build/72/Zend/zend_vm_execute.h:816
#10 execute_ex (ex=0x38) at /home/zero/.phpbrew/build/72/Zend/zend_vm_execute.h:59762
#11 0x000055db1cfac579 in zend_execute (op_array=op_array@entry=0x7f96264802a0, return_value=0x0,
return_value@entry=0x7f96253eca20)
at /home/zero/.phpbrew/build/72/Zend/zend_vm_execute.h:63776
#12 0x000055db1cefbd22 in zend_execute_scripts (type=type@entry=8, retval=0x7f96253eca20,
retval@entry=0x0, file_count=641874736, file_count@entry=3)
at /home/zero/.phpbrew/build/72/Zend/zend.c:1498
#13 0x000055db1ce97d50 in php_execute_script (primary_file=0x7ffc9a324cf0) at
/home/zero/.phpbrew/build/72/main/main.c:2599
#14 0x000055db1cfae98c in do_cli (argc=2, argv=0x55db1f559490) at
/home/zero/.phpbrew/build/72/sapi/cli/php_cli.c:1011
#15 0x000055db1cbe556b in main (argc=2, argv=0x55db1f559490) at
/home/zero/.phpbrew/build/72/sapi/cli/php_cli.c:1403
------------------------------------------------------------------------
[2019-09-26 08:27:50] john dot royer at gmail dot com
My friend is using PHP 7.3.7 and running the same unit test, his PHP works just fine.
For me, most PHP 7.3.x gets segment fault.
I wonder if the problem is not in PHP layer ?
------------------------------------------------------------------------
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
https://bugs.php.net/bug.php?id=78592
--
Edit this bug report at https://bugs.php.net/bug.php?id=78592&edit=1