Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103132 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 3164 invoked from network); 5 Sep 2018 14:33:47 -0000 Received: from unknown (HELO NAM02-SN1-obe.outbound.protection.outlook.com) (104.47.36.118) by pb1.pair.com with SMTP; 5 Sep 2018 14:33:47 -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=serFXBdYyJLb8jOij5D3uBkNUH8PA8An+gQQbskraQE=; b=sPjBYTJjh/XRMWbPpUIPR52qjUdkI6P1XN6Hz7EziqLYYe8+JWyXxT9x42X9X1EtioJShIptVmBnOaRUOP2AQTozaE+bNB4CsbA7vA9cE5d0Wmt07g3ZGD86b+a5G5bODNNlbTLWUrFuCC90R7JCJ5w6JpehhpxJbnKNnH/ZuYE= Received: from BY1PR02MB1260.namprd02.prod.outlook.com (10.162.109.14) by BY1PR02MB1241.namprd02.prod.outlook.com (10.162.108.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1101.18; Wed, 5 Sep 2018 10:36:33 +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 10:36:33 +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: AQHURGwXo94tZNIDxEqRrFlryqZ97qThNe6mgAA2rgCAABLjtg== Date: Wed, 5 Sep 2018 10:36:33 +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;BY1PR02MB1241;6:dyGFuZr0nWU+tkuZXFGXnZm+kQFZ2FWEb4qsF5xQhXY1Pj9/UXKhWObciv+KA0Ge9u4qtS+MxVCEVvsCgDbid84QIxe9FR9BOix9AfkHL41Y+BZUyeJmpqHHogOGhMP0QkT8g9xdODMbjbI519L7Mk1AqI+x4upLPBxoHoE3A4TU/rNA3TNmpAKaPslG6+uZdQXA2VVtRSQuBT/be0X2/9CHaDrCEiSshjud4YBUo6fmCT4ez5WIGs7z314FtyoYpFpBODm0wWKxFOzf4FojEL7jW6Zttfd2AsqQirXjy3ipau8VTfYyVUge4aA+AFlFIpHUsPPnNPpRtGu4I3jO/T4Co1XY/YQvqr9wAHqttfn5nbjWYU6E2XShUf238qkm/dVXEFb5NwqvXvXeBd6CA/8g81mLd05mbGH+JQUMm7E+hPVX/35/4b8UtcgHUiNi5IgZP7i5bCoFaYeZo3sAOw==;5:du7r7mJ+2JYUbfIDNQ9wUjY4V73ny9tFtRMVnyqC3pRg0S/2W8SFLjVhZhRKX3tsFfafDgUmXEcHPeUd0jOIlwO1MYxk6VBD8xM2LKw75+EQf0pDGYpJMDpt6XyUUeIbeMTvyHWiCRyf7BrkHb1IrY+O+sv9cOVUsKplDnrAb94=;7:s1mddCR1g+Vb0jo1QNvNXAf2b/LLeHwNuT0Rt9oDtlKoH8Eje7QKGcf7FzOVby5qRWF7T1DRrt9XLZKk6LnmnEAbG1VocxIVrQM+PrO8D23NSB6NRZBf91EavtYoWZWI3NBQM8+humqUhgYhJvonw2VC4l69tWIbUKCZITx761JLc0K/Qd3pHqL9bWLH3EqsQlNiv0YZz6XEDWs3NVsJBjfYgfNt2OczndFC0g1AIESEQIHWuVq8alks+UeMKiCU x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 89e43747-315d-49c9-84a0-08d6131b7339 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:BY1PR02MB1241; x-ms-traffictypediagnostic: BY1PR02MB1241: 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)(8121501046)(5005006)(10201501046)(3231311)(944501410)(52105095)(93006095)(93001095)(3002001)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201708071742011)(7699016);SRVR:BY1PR02MB1241;BCL:0;PCL:0;RULEID:;SRVR:BY1PR02MB1241; x-forefront-prvs: 078693968A x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(376002)(346002)(396003)(366004)(136003)(39850400004)(189003)(199004)(26005)(53546011)(7696005)(8936002)(66066001)(229853002)(9686003)(236005)(54896002)(6306002)(53936002)(55016002)(25786009)(186003)(4326008)(575784001)(86362001)(6436002)(76176011)(15188155005)(6606003)(68736007)(486006)(99286004)(16799955002)(2900100001)(6916009)(6246003)(105586002)(5250100002)(106356001)(316002)(476003)(478600001)(966005)(14454004)(5660300001)(446003)(606006)(3846002)(102836004)(97736004)(7736002)(33656002)(11346002)(19627405001)(256004)(6116002)(6506007)(8676002)(81166006)(74316002)(2906002)(81156014)(556834004);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR02MB1241;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: qPo6iVGJhj1E5eRkiYpj42cAdoLp2vy1yfJmOQrwHmWtfsM+RHxuWMFB6v5aVaKFE2/UWfqJmuGnJ2LWefXeGq8xhSYmgkNNASxUI8eQ2p0hJX0LUFtyywj4D7XvI9YuYAtQW8pfchFszRF017qr11YiZvhkRkVHpX9jtAyl40KrdkOstiuS5xBZ8j3lkdx6FD1BrYBW1lVeUx+l/hVN1pCuAW3io1DIMa8mgLZ4ti31R/0NLQst8Ent1/Rq8bjoGTfUYeeBF72lQlLjj5xh/J2Hn3h1xmP9YA410TuD1FX0cZy8zf8laEnTYJJuoBKYwBG4SfvIq3huluC94ZLjOKUKizc5+SeR+nXqNBp7z1M= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_BY1PR02MB1260CDAC4C39154837064311BF020BY1PR02MB1260namp_" MIME-Version: 1.0 X-OriginatorOrg: zend.com X-MS-Exchange-CrossTenant-Network-Message-Id: 89e43747-315d-49c9-84a0-08d6131b7339 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Sep 2018 10:36:33.5015 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 32210298-c08b-4829-8097-6b12c025a892 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR02MB1241 Subject: Re: [PHP-DEV] Re: Mysterious (to me) Xdebug issue with PHP 7.3 From: dmitry@zend.com (Dmitry Stogov) --_000_BY1PR02MB1260CDAC4C39154837064311BF020BY1PR02MB1260namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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_BY1PR02MB1260CDAC4C39154837064311BF020BY1PR02MB1260namp_--