php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79113 Segfault in test suite
Submitted: 2020-01-14 08:38 UTC Modified: -
From: remi@php.net Assigned:
Status: Open Package: expect (PECL)
PHP Version: Irrelevant OS: GNU/Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: remi@php.net
New email:
PHP Version: OS:

 

 [2020-01-14 08:38 UTC] remi@php.net
Description:
------------
Test suite passes on PHP 5.x

With PHP 7 (tested with 7.0.33, 7.3.13, 7.4.1)

(gdb) bt
#0  _mm_storeu_si128 (__B=..., __P=0x7ffff7600000) at /usr/lib/gcc/x86_64-redhat-linux/9/include/emmintrin.h:727
#1  zend_hash_real_init_mixed_ex (ht=0x5555559f7b70 <executor_globals+560>) at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/Zend/zend_hash.c:163
#2  zend_hash_real_init_mixed (ht=0x5555559f7b70 <executor_globals+560>) at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/Zend/zend_hash.c:260
#3  0x0000555555805cf5 in _zend_hash_index_add_or_update_i (flag=10, pData=0x7fffffffb710, h=1, ht=0x5555559f7b70 <executor_globals+560>)
    at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/Zend/zend_hash.c:952
#4  zend_hash_index_add_new (ht=ht@entry=0x5555559f7b70 <executor_globals+560>, h=h@entry=1, pData=pData@entry=0x7fffffffb710)
    at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/Zend/zend_hash.c:1005
#5  0x000055555580b6fc in zend_list_insert (ptr=ptr@entry=0x7ffff7408000, type=2) at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/Zend/zend_list.c:42
#6  0x000055555580b7ed in zend_register_resource (rsrc_pointer=rsrc_pointer@entry=0x7ffff7408000, rsrc_type=<optimized out>)
    at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/Zend/zend_list.c:96
#7  0x00005555557af0b3 in _php_stream_alloc (ops=ops@entry=0x5555559bb920 <php_stream_output_ops>, abstract=abstract@entry=0x0, persistent_id=persistent_id@entry=0x0, 
    mode=mode@entry=0x555555893a02 "wb") at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/main/streams/streams.c:304
#8  0x0000555555785737 in php_stream_url_wrap_php (wrapper=0x5555559bb840 <php_stream_php_wrapper>, path=0x555555a2250e "output", mode=0x7ffff7fa90c2 "a", options=8, 
    opened_path=0x0, context=<optimized out>) at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/ext/standard/php_fopen_wrapper.c:216
#9  0x00005555557b1e4f in _php_stream_open_wrapper_ex (path=path@entry=0x555555a22508 "php://output", mode=mode@entry=0x7ffff7fa90c2 "a", options=<optimized out>, 
    options@entry=0, opened_path=opened_path@entry=0x0, context=context@entry=0x0) at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/main/streams/streams.c:2033
#10 0x00007ffff7fa80b7 in OnSetExpectLogFile (entry=<optimized out>, new_value=0x555555a224f0, mh_arg1=<optimized out>, mh_arg2=<optimized out>, mh_arg3=<optimized out>, 
    stage=<optimized out>) at /work/pecl/expect/expect.c:159
#11 0x0000555555811a56 in zend_register_ini_entries (ini_entry=0x7ffff7faab20 <ini_entries+128>, ini_entry@entry=0x7ffff7faaaa0 <ini_entries>, 
    module_number=module_number@entry=15) at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/Zend/zend_ini.c:258
#12 0x00007ffff7fa7832 in zm_startup_expect (type=<optimized out>, module_number=15) at /work/pecl/expect/expect.c:204
#13 0x00005555557fbab8 in zend_startup_module_ex (module=0x555555a567a0) at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/Zend/zend_API.c:1878
#14 zend_startup_module_ex (module=0x555555a567a0) at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/Zend/zend_API.c:1831
#15 0x00005555557fbb50 in zend_startup_module_zval (zv=<optimized out>) at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/Zend/zend_API.c:1893
#16 0x00005555558083bb in zend_hash_apply (ht=ht@entry=0x5555559f8260 <module_registry>, apply_func=apply_func@entry=0x5555557fbb40 <zend_startup_module_zval>)
    at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/Zend/zend_hash.c:1689
#17 0x00005555557fbe2e in zend_startup_modules () at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/Zend/zend_API.c:2004
#18 0x0000555555799216 in php_module_startup (sf=<optimized out>, additional_modules=<optimized out>, num_additional_modules=<optimized out>)
    at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/main/main.c:2342
#19 0x0000555555883331 in php_cli_startup (sapi_module=<optimized out>) at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/sapi/cli/php_cli.c:420
#20 0x0000555555662ce4 in main (argc=68, argv=0x5555559fe1d0) at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/sapi/cli/php_cli.c:1356



Or

(gdb) bt
#0  zend_hash_internal_pointer_reset_ex (ht=0x5555559db180 <zend_empty_array>, pos=0x5555559db1a4 <zend_empty_array+36>)
    at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/Zend/zend_hash.c:385
#1  0x00007ffff7fa7c05 in zif_expect_expectl (execute_data=<optimized out>, return_value=0x7fffffff96e0) at /work/pecl/expect/expect.c:348
#2  0x000055555587d16e in ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER () at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/Zend/zend_vm_execute.h:649
#3  execute_ex (ex=0x5555559db180 <zend_empty_array>) at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/Zend/zend_vm_execute.h:55493
#4  0x0000555555882147 in zend_execute (op_array=op_array@entry=0x7ffff74872a0, return_value=0x0, return_value@entry=0x7ffff746f100)
    at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/Zend/zend_vm_execute.h:60913
#5  0x00005555557f831c in zend_execute_scripts (type=type@entry=8, retval=0x7ffff746f100, retval@entry=0x0, file_count=-146677712, file_count@entry=3)
    at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/Zend/zend.c:1568
#6  0x0000555555799cd0 in php_execute_script (primary_file=<optimized out>) at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/main/main.c:2639
#7  0x0000555555884717 in do_cli (argc=64, argv=0x5555559fe1d0) at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/sapi/cli/php_cli.c:997
#8  0x0000555555662fe8 in main (argc=64, argv=0x5555559fe1d0) at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/sapi/cli/php_cli.c:1389
(gdb) 
#0  zend_hash_internal_pointer_reset_ex (ht=0x5555559db180 <zend_empty_array>, pos=0x5555559db1a4 <zend_empty_array+36>)
    at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/Zend/zend_hash.c:385
#1  0x00007ffff7fa7c05 in zif_expect_expectl (execute_data=<optimized out>, return_value=0x7fffffff96e0) at /work/pecl/expect/expect.c:348
#2  0x000055555587d16e in ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER () at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/Zend/zend_vm_execute.h:649
#3  execute_ex (ex=0x5555559db180 <zend_empty_array>) at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/Zend/zend_vm_execute.h:55493
#4  0x0000555555882147 in zend_execute (op_array=op_array@entry=0x7ffff74872a0, return_value=0x0, return_value@entry=0x7ffff746f100)
    at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/Zend/zend_vm_execute.h:60913
#5  0x00005555557f831c in zend_execute_scripts (type=type@entry=8, retval=0x7ffff746f100, retval@entry=0x0, file_count=-146677712, file_count@entry=3)
    at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/Zend/zend.c:1568
#6  0x0000555555799cd0 in php_execute_script (primary_file=<optimized out>) at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/main/main.c:2639
#7  0x0000555555884717 in do_cli (argc=64, argv=0x5555559fe1d0) at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/sapi/cli/php_cli.c:997
#8  0x0000555555662fe8 in main (argc=64, argv=0x5555559fe1d0) at /usr/src/debug/php-7.3.13-1.fc31.remi.x86_64/sapi/cli/php_cli.c:1389


or 

#0  0x00007ffff7fb178f in expectv () from /lib64/libexpect5.45.4.so
#1  0x00007ffff7fc8d20 in zif_expect_expectl (execute_data=<optimized out>, return_value=0x7ffff74140c0) at /work/pecl/expect/expect.c:446
#2  0x0000555555801a9b in ZEND_DO_ICALL_SPEC_HANDLER () at /usr/src/debug/php70-php-7.0.33-15.fc31.remi.x86_64/Zend/zend_vm_execute.h:586
#3  0x00005555557f4b93 in execute_ex (ex=<optimized out>) at /usr/src/debug/php70-php-7.0.33-15.fc31.remi.x86_64/Zend/zend_vm_execute.h:414
#4  0x000055555583f8d9 in zend_execute (op_array=op_array@entry=0x7ffff7487000, return_value=return_value@entry=0x7ffff7488100)
    at /usr/src/debug/php70-php-7.0.33-15.fc31.remi.x86_64/Zend/zend_vm_execute.h:458
#5  0x00005555557b5b1c in zend_execute_scripts (type=type@entry=8, retval=0x7ffff7488100, retval@entry=0x0, file_count=-146718672, file_count@entry=3)
    at /usr/src/debug/php70-php-7.0.33-15.fc31.remi.x86_64/Zend/zend.c:1445
#6  0x0000555555757dd0 in php_execute_script (primary_file=<optimized out>) at /usr/src/debug/php70-php-7.0.33-15.fc31.remi.x86_64/main/main.c:2516
#7  0x000055555584172a in do_cli (argc=64, argv=0x5555559af660) at /usr/src/debug/php70-php-7.0.33-15.fc31.remi.x86_64/sapi/cli/php_cli.c:977
#8  0x0000555555639f18 in main (argc=64, argv=0x5555559af660) at /usr/src/debug/php70-php-7.0.33-15.fc31.remi.x86_64/sapi/cli/php_cli.c:1347


Test script:
---------------
make test



Patches

Pull Requests

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Nov 25 06:01:32 2024 UTC