Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103134 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 4697 invoked from network); 5 Sep 2018 23:09:52 -0000 Received: from unknown (HELO NAM01-BN3-obe.outbound.protection.outlook.com) (104.47.33.102) by pb1.pair.com with SMTP; 5 Sep 2018 23:09:52 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=RWSoftware.onmicrosoft.com; s=selector1-zend-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZKOcq9O9gBNEQfJ0+tZ/AWKX1Ke2AxmkMmiRICTMbsc=; b=VDHgAx5mmyq7vxEL4eN3kuPFKxP5vXVKtEpSFsoKAx0sLd3k+NlfM81doNCCzkwqkh+bKWV8dwH7gY7ieNbJ9UP2Qf4/NY1QZTtjn0sSP1U59CxuYIxfkhhq49oHwwu4HOs1L+eMSSyQPw5ubzbHfHHy9gfzouwMLpASXAYS5hQ= Received: from BY1PR02MB1260.namprd02.prod.outlook.com (10.162.109.14) by BY1PR02MB1225.namprd02.prod.outlook.com (10.162.108.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1101.17; Wed, 5 Sep 2018 19:12:45 +0000 Received: from BY1PR02MB1260.namprd02.prod.outlook.com ([fe80::d456:10e4:82bc:26de]) by BY1PR02MB1260.namprd02.prod.outlook.com ([fe80::d456:10e4:82bc:26de%6]) with mapi id 15.20.1101.016; Wed, 5 Sep 2018 19:12:45 +0000 To: Derick Rethans CC: PHP Developers Mailing List Thread-Topic: [PHP-DEV] Re: Mysterious (to me) Xdebug issue with PHP 7.3 Thread-Index: AQHURGwXo94tZNIDxEqRrFlryqZ97qThNe6mgAA2rgCAABLjtoAAkGTB Date: Wed, 5 Sep 2018 19:12:45 +0000 Message-ID: References: ,, In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=dmitry@zend.com; x-originating-ip: [212.232.72.197] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY1PR02MB1225;6:uQjSBK3X2LwDWpryWS9HWcBV/9F6DOrXY7yzNbLTFn3dIbm+rNo+Ejfu2GITKiX/TKq4J5cMyeOWoaK/kQuJuHCj/i0vnDm2IcEPQtSiReOXbcsslDs/qTlyu5+o0jX704OAQ1z+pI05OM5YG3T49q4CVp9r+wPKVLtmk2S9bYrhfuZYyS6PdLjSBs7gilGH4oud2znV/bfSa14e3kFYhA8P/mJNUhlSRQ9bjfEMLRkszgWqdNpc7sUAic+IA/3JHacshnrMRuqT9BySQziddhNbi0thmDliJmHoFs7hPazYWiwIgtiE47zcQYf8MoMrQhKG96K2EFPYQTBhlcND4oVMOTa0vdid1ii9SwzdVXHjhPLdKCL0v9i4M0V0sXxFvyMH6kLSX9/zK39a2VDT1/cTrtDNqVyS21lI7yqTzps3L3wSB7Mtn0K8kGJgnmz4Vw2pEreoPTin62w19Ih/Hw==;5:X5cxWF9e4+sr9QMJkL8oQd4auh45yN6DErlcZoupHg7IKY7TNISWulCa2YHx/DWwem+nPQxSShcyw5WQWpi9GjBgBdnZRD8J34b2GEwQykD6kIzCJiaLnFJ1hX7s2N41neiox+OrNB7w6cv18dlnzG3U5O4QKzasY0ghYdbNl+M=;7:L+aDt+OPxuNObnhE5+ZwR5JC2T+Ob7r3kdFtv6nuGQdIrEQ0NuqXDZFvC0tBgOXOZt7g28dCISojH6XgWwu3Ye1KZvn039AuuHf3h3Xn3ScyI0Aj/RA1CVrl0apIiHfzUmZbGyoUBlOo74QIiEzHL/P4HuKSN+kqO+upnqyJ7Qb4rxwn8piakvqKUjfwE/zW0BkX+yWBoZYbURzzON1UoE/Va0R7nveJo7VMmxwkqe/zebbpQlfVR6e9NIoBUSeq x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 1c30c564-8a3a-4e34-bce0-08d613638fc8 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:BY1PR02MB1225; x-ms-traffictypediagnostic: BY1PR02MB1225: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(148322886591682)(23657631684272)(166708455590820); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(3231311)(944501410)(52105095)(149027)(150027)(6041310)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123560045)(201708071742011)(7699016);SRVR:BY1PR02MB1225;BCL:0;PCL:0;RULEID:;SRVR:BY1PR02MB1225; x-forefront-prvs: 078693968A x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(136003)(346002)(39850400004)(376002)(366004)(189003)(199004)(105586002)(74316002)(6916009)(15188155005)(3846002)(316002)(16799955002)(7736002)(97736004)(6116002)(19627405001)(93156006)(256004)(66066001)(486006)(575784001)(25786009)(186003)(14444005)(5660300001)(11346002)(8936002)(106356001)(26005)(102836004)(446003)(86362001)(7696005)(14454004)(76176011)(93886005)(478600001)(5250100002)(966005)(6246003)(33656002)(476003)(99286004)(4326008)(68736007)(6506007)(53546011)(229853002)(2906002)(6436002)(8676002)(55016002)(81166006)(81156014)(236005)(6306002)(54896002)(9686003)(2940100002)(606006)(2900100001)(53936002)(6606003)(556834004);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR02MB1225;H:BY1PR02MB1260.namprd02.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: zend.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: Nw86tFKwr6N7O/csruR4w+rPsoasUHARlqBlkYY4hAlRc7HamzFyS+nrgjL4N3u+/5Uvh5fb3JoAG17GyOmZJB612Sdg9n1iDFqWn1/q4aQlZNnZ9U/UVjTX4OX5AF6mt/oHUcL+NhZzHv2VsPVvxVpzoJhSd/0R+z1VDn3AVZIz7T0ARcgauNKIGyjIuDgGG8/0RTG+oZfPIKTqUDq0ADylKpe4L4WbFDjBrk5sSAAUxb2tBTyK+Q5HDqZ1kRNgKnTtUm1Y8ijpzf8qRnzD0oH0cC1Ui3EA045e0f+oKVmg7KaKWj5xP9ZX3l3C9dypk09UGCIPSSTEfK0nYYSHcce0MNaOzpT5CDO75EH6JvE= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_BY1PR02MB1260A910CA056415E54C5BF7BF020BY1PR02MB1260namp_" MIME-Version: 1.0 X-OriginatorOrg: zend.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1c30c564-8a3a-4e34-bce0-08d613638fc8 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Sep 2018 19:12:45.2739 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 32210298-c08b-4829-8097-6b12c025a892 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR02MB1225 Subject: Re: [PHP-DEV] Re: Mysterious (to me) Xdebug issue with PHP 7.3 From: dmitry@zend.com (Dmitry Stogov) --_000_BY1PR02MB1260A910CA056415E54C5BF7BF020BY1PR02MB1260namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I hope, it's fixed now. Please verify. Dmitry. ________________________________ From: Dmitry Stogov Sent: Wednesday, September 5, 2018 1:36:33 PM To: Derick Rethans Cc: PHP Developers Mailing List Subject: Re: [PHP-DEV] Re: Mysterious (to me) Xdebug issue with PHP 7.3 I see the problem, and most probably, it has to be fixed in PHP sources. I'll try to take a deeper look today evening. Thanks. Dmitry. ________________________________ From: Derick Rethans Sent: Wednesday, September 5, 2018 12:27:56 PM To: Dmitry Stogov Cc: PHP Developers Mailing List Subject: [PHP-DEV] Re: Mysterious (to me) Xdebug issue with PHP 7.3 Hi, in Xdebug, I do supply my own opcode handlers for quite a few opcodes, including ZEND_IS_EQUAL, and a whole bunch of others. Is it possible that when you use zend_set_user_opcode_handler[1][2] that this swap isn't done with zend_swap_operands? My opcode handler basically just does some code and then uses ZEND_VM_DISPATCH[3]. [1] https://github.com/derickr/xdebug/blob/PHP-7.3-support/xdebug_code_cove= rage.h#L47-L48 [2] https://github.com/derickr/xdebug/blob/PHP-7.3-support/xdebug.c#L781 [3] https://github.com/derickr/xdebug/blob/PHP-7.3-support/xdebug_code_cove= rage.c#L125-L142 cheers, Derick On Wed, 5 Sep 2018, Dmitry Stogov wrote: > Hi Derick, > > > The message "Invalid opcode 17/1/8" means that PHP doesn't have handler f= or opcode 17 (ZEND_IS_EQUAL) where first operand IS_CONST and second operan= d IS_CV. > > > ZEND_IS_EQUAL is a commutative operator. zend_vm_gen.php doesn't generate= code for ZEND_IS_EQUAL_SPEC_CONST_CV_HANDLER, but PHP code-generator swaps= operands, if necessary, to use ZEND_IS_EQUAL_SPEC_CV_CONST_HANDLER. > > > ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler(zend_op* op) > { > zend_uchar opcode =3D zend_user_opcodes[op->opcode]; > uint32_t spec =3D zend_spec_handlers[opcode]; > > if (spec & SPEC_RULE_COMMUTATIVE) { > if (op->op1_type < op->op2_type) { > zend_swap_operands(op); > } > } > op->handler =3D zend_vm_get_opcode_handler_ex(spec, op); > } > > > I have no idea, why PHP with xdebug doen't swap operands. > > > Thanks. Dmitry. > > ________________________________ > From: Derick Rethans > Sent: Tuesday, September 4, 2018 7:26:49 PM > To: Dmitry Stogov > Cc: PHP Developers Mailing List > Subject: Mysterious (to me) Xdebug issue with PHP 7.3 > > Hi, > > I'm finalizing Xdebug support for PHP 7.3, and although I have fixed > many things, there is one thing that is (currently) eluding me. > > The branch I'm working on is > https://github.com/derickr/xdebug/tree/PHP-7.3-support > > With Xdebug (just) loaded, the following script: > > $ cat /tmp/bug01471.php > $c =3D "aa" =3D=3D $ff ? 1 : 0; > ?> > > Fails to run with: > > $ php -n -dzend_extension=3Dxdebug.so /tmp/bug01471.php > > Fatal error: Invalid opcode 17/1/8. in /tmp/bug01471.php on line = 2 > > Call Stack: > 0.0002 0 1. {main}() /tmp/bug01471.php:0 > > I also see others, like when running with a Composer library: > > $ vendor/bin/phpunit --debug > > Fatal error: Invalid opcode 16/1/2. in /home/derick/dev/php/deric= kr-mongo-php-library/vendor/composer/autoload_real.php on line 18 > > Call Stack: > 0.0003 431424 1. {main}() /home/derick/dev/php/derickr-= mongo-php-library/vendor/phpunit/phpunit/phpunit:0 > 0.0005 433616 2. require('/home/derick/dev/php/derickr-= mongo-php-library/vendor/autoload.php') /home/derick/dev/php/derickr-mongo-= php-library/vendor/phpunit/phpunit/phpunit:51 > 0.0008 450432 3. ComposerAutoloaderInit96731179a4aab683= 8b54de3a71995ee1::getLoader() /home/derick/dev/php/derickr-mongo-php-librar= y/vendor/autoload.php:7 > > And I can't figure out why. The backtrace isn't particularly useful > either. I got similar issues with get_zval_ptr [1], as it changed, but I > can't track this specific one down. Would you mind having a look? > > cheers, > Derick > > [1] https://github.com/derickr/xdebug/commit/70d9189700d57707d842020493a3= df23e0c76098 > -- > > > -- > https://derickrethans.nl | https://xdebug.org | https://dram.io > Like Xdebug? Consider a donation: https://xdebug.org/donate.php, > or become my Patron: https://www.patreon.com/derickr > twitter: @derickr and @xdebug > -- https://derickrethans.nl | https://xdebug.org | https://dram.io Like Xdebug? Consider a donation: https://xdebug.org/donate.php, or become my Patron: https://www.patreon.com/derickr twitter: @derickr and @xdebug -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php --_000_BY1PR02MB1260A910CA056415E54C5BF7BF020BY1PR02MB1260namp_--