php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77266 Assertion failed in dce_live_ranges
Submitted: 2018-12-08 00:21 UTC Modified: 2018-12-08 15:08 UTC
From: dwilks at intacct dot com Assigned:
Status: Closed Package: opcache
PHP Version: 7.2Git-2018-12-08 (Git) OS: OS X 10.14.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
36 + 6 = ?
Subscribe to this entry?

 
 [2018-12-08 00:21 UTC] dwilks at intacct dot com
Description:
------------
PHP 7.3.0 built from sources
Non-core modules are from master

[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
fileinfo
filter
gd
gettext
hash
iconv
igbinary
json
libxml
mbstring
memcached
mongodb
oci8
openssl
pcre
PDO
PDO_OCI
Phar
posix
readline
Reflection
session
SimpleXML
soap
SPL
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zlib

[Zend Modules]
Zend OPcache


'./configure'  '--prefix=/usr/local/php73' '--enable-debug' '--enable-phpdbg-debug' '--with-config-file-path=/usr/local/php73/etc' '--with-config-file-scan-dir=/usr/local/php73/db' '--disable-all' '--disable-cgi' '--disable-fpm' '--enable-cli' '--enable-phar' '--enable-bcmath' '--enable-calendar' '--enable-ctype' '--enable-dom' '--enable-fileinfo' '--enable-filter' '--enable-hash' '--enable-json' '--enable-libxml' '--enable-mbstring' '--enable-opcache' '--enable-pdo' '--enable-posix' '--enable-session' '--enable-simplexml' '--enable-soap' '--enable-tokenizer' '--enable-wddx' '--with-libexpat-dir=/opt/local' '--enable-xml' '--enable-xmlreader' '--enable-xmlwriter' '--with-bz2=/opt/local' '--with-curl=/opt/local' '--with-gd' '--with-freetype-dir=/opt/local' '--with-jpeg-dir=/opt/local' '--with-png-dir=/opt/local' '--with-zlib-dir=/opt/local' '--with-webp-dir=/opt/local' '--with-gettext=/opt/local' '--with-iconv=/opt/local' '--with-mhash=/opt/local' '--with-oci8=instantclient,/opt/local/lib/oracle' '--with-openssl=/opt/local' '--with-kerberos=/opt/local' '--with-pear' '--with-pcre-regex=/opt/local' '--with-pdo-oci=instantclient,/opt/local/lib/oracle,11.2' '--with-readline=/opt/local' '--with-libxml-dir=/opt/local' '--with-xsl=/opt/local' '--with-zlib=/opt/local' '--with-apxs2=/opt/local/bin/apxs'

Here's the opcache config
Directive => Local Value => Master Value
opcache.blacklist_filename => no value => no value
opcache.consistency_checks => 0 => 0
opcache.dups_fix => Off => Off
opcache.enable => On => On
opcache.enable_cli => On => On
opcache.enable_file_override => Off => Off
opcache.error_log => no value => no value
opcache.file_cache => no value => no value
opcache.file_cache_consistency_checks => 1 => 1
opcache.file_cache_only => 0 => 0
opcache.file_update_protection => 2 => 2
opcache.force_restart_timeout => 180 => 180
opcache.huge_code_pages => Off => Off
opcache.interned_strings_buffer => 32 => 32
opcache.lockfile_path => /tmp => /tmp
opcache.log_verbosity_level => 2 => 2
opcache.max_accelerated_files => 100000 => 100000
opcache.max_file_size => 0 => 0
opcache.max_wasted_percentage => 5 => 5
opcache.memory_consumption => 768 => 768
opcache.opt_debug_level => 0 => 0
opcache.optimization_level => 0x7FFEBFFF => 0x7FFEBFFF
opcache.preferred_memory_model => no value => no value
opcache.protect_memory => 0 => 0
opcache.restrict_api => no value => no value
opcache.revalidate_freq => 0 => 0
opcache.revalidate_path => Off => Off
opcache.save_comments => 1 => 1
opcache.use_cwd => On => On
opcache.validate_permission => Off => Off
opcache.validate_root => Off => Off
opcache.validate_timestamps => On => On


Test script:
---------------
https://pastebin.com/A6UjSRnf

Fails either as a script with opcache.enable_cli on or as Apache request with opcache.enable on.



Actual result:
--------------
[Fri Dec 07 15:52:01.678969 2018] [core:notice] [pid 22716] AH00052: child pid 22718 exit signal Abort trap (6)
Assertion failed: (op_array->opcodes[def].result_type & ((1<<1)|(1<<2))), function dce_live_ranges, file /Users/dwilks/src/php-src-PHP-7.3.0/ext/opcache/Optimizer/dce.c, line 515.


(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 2.1
  * frame #0: 0x00007fff78bbd14a libsystem_c.dylib`abort
    frame #1: 0x00007fff78b85868 libsystem_c.dylib`__assert_rtn + 320
    frame #2: 0x000000010a8b8603 opcache.so`dce_live_ranges(ctx=0x00007ffee81eb238, op_array=0x000000010a60ec28, ssa=0x000000010a6dd9b0) at dce.c:515
    frame #3: 0x000000010a8b7527 opcache.so`dce_optimize_op_array(op_array=0x000000010a60ec28, ssa=0x000000010a6dd9b0, reorder_dtor_effects='\0') at dce.c:649
    frame #4: 0x000000010a87b70c opcache.so`zend_dfa_optimize_op_array(op_array=0x000000010a60ec28, ctx=0x00007ffee81eb568, ssa=0x000000010a6dd9b0, call_map=0x000000010a6de690) at dfa_pass.c:907
    frame #5: 0x000000010a858e0d opcache.so`zend_optimize_script(script=0x000000010a696000, optimization_level=2147401727, debug_level=0) at zend_optimizer.c:1503
    frame #6: 0x000000010a8140a4 opcache.so`cache_script_in_shared_memory(new_persistent_script=0x000000010a696000, key="/Volumes/Sandboxes/Users/dwilks/src/php73opcache/Lock.cls", key_length=57, from_shared_memory=0x00007ffee81eb760) at ZendAccelerator.c:1444
    frame #7: 0x000000010a813a14 opcache.so`persistent_compile_file(file_handle=0x00007ffee81eb7d0, type=8) at ZendAccelerator.c:2097
    frame #8: 0x000000010877bd4f libphp7.so`zend_include_or_eval(inc_filename=0x00000001155dcfa0, type=16) at zend_execute.c:3152
    frame #9: 0x0000000108714b8a libphp7.so`ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(execute_data=0x000000010a61f030) at zend_vm_execute.h:3254
    frame #10: 0x00000001086e8954 libphp7.so`execute_ex(ex=0x000000010a61f030) at zend_vm_execute.h:55287
    frame #11: 0x00000001086e8b5a libphp7.so`zend_execute(op_array=0x000000010a66e200, return_value=0x0000000000000000) at zend_vm_execute.h:60834
    frame #12: 0x000000010867b912 libphp7.so`zend_execute_scripts(type=8, retval=0x0000000000000000, file_count=3) at zend.c:1568
    frame #13: 0x00000001085cd8f4 libphp7.so`php_execute_script(primary_file=0x00007ffee81ec2f0) at main.c:2630
    frame #14: 0x0000000108788fcd libphp7.so`php_handler(r=0x00007fd869888ea0) at sapi_apache2.c:699
    frame #15: 0x0000000107a16787 httpd`ap_run_handler + 51
    frame #16: 0x0000000107a16d47 httpd`ap_invoke_handler + 246
    frame #17: 0x0000000107a4c138 httpd`ap_process_async_request + 861
    frame #18: 0x0000000107a4c1cf httpd`ap_process_request + 20
    frame #19: 0x0000000107a48de1 httpd`ap_process_http_connection + 302
    frame #20: 0x0000000107a26e6d httpd`ap_run_process_connection + 51
    frame #21: 0x0000000107a5387e httpd`child_main + 1084
    frame #22: 0x0000000107a5332d httpd`make_child + 404
    frame #23: 0x0000000107a53386 httpd`startup_children + 89
    frame #24: 0x0000000107a52567 httpd`prefork_run + 286
    frame #25: 0x0000000107a291f7 httpd`ap_run_mpm + 64
    frame #26: 0x0000000107a1db9c httpd`main + 2108
    frame #27: 0x00007fff78b1508d libdyld.dylib`start + 1
(lldb) 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-12-08 15:08 UTC] cmb@php.net
-Status: Open +Status: Verified -PHP Version: 7.3.0 +PHP Version: 7.2Git-2018-12-08 (Git)
 [2018-12-08 15:08 UTC] cmb@php.net
I can reproduce this issue with a minimal build (--disable-all
--enable-debug --enable-opcache) with PHP-7.3, but also with
PHP-7.2.
 [2019-01-08 11:19 UTC] laruence@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=cd49db9d47fa979c308ef25b43123b08be0a5ab0
Log: Fixed bug #77266 (Assertion failed in dce_live_ranges)
 [2019-01-08 11:19 UTC] laruence@php.net
-Status: Verified +Status: Closed
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Sep 16 00:01:27 2019 UTC