Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100702 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13457 invoked from network); 18 Sep 2017 17:04:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Sep 2017 17:04:19 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain zend.com from 104.47.42.98 cause and error) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 104.47.42.98 mail-by2nam03on0098.outbound.protection.outlook.com Received: from [104.47.42.98] ([104.47.42.98:21226] helo=NAM03-BY2-obe.outbound.protection.outlook.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 65/52-19300-19CFFB95 for ; Mon, 18 Sep 2017 13:04:17 -0400 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; bh=KY/Ute6YJuk/+wznJa3Lie1q42qCVUv1Wn4dKSsDLjg=; b=xA0n44uOqNlMGrM+qKz+DO3aPDB5ijEpUaheFxBHFIVqtdYaOM+0feJd2fgQG1zYyrnXbwqCxAP2eGtlvh3h5QCsUZxowEVST2jcZf9MIzSA+wGUuIEKAyOO7lyoRGkGkjVJMRycVKkU9Y577IIm+qYRmq2F4hoIiIDh7ZSrRCI= Received: from BN6PR02MB3234.namprd02.prod.outlook.com (10.161.152.32) by BN6PR02MB2481.namprd02.prod.outlook.com (10.173.141.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.11; Mon, 18 Sep 2017 17:04:13 +0000 Received: from BN6PR02MB3234.namprd02.prod.outlook.com ([10.161.152.32]) by BN6PR02MB3234.namprd02.prod.outlook.com ([10.161.152.32]) with mapi id 15.20.0056.016; Mon, 18 Sep 2017 17:04:13 +0000 To: Giovanni Giacobbi , PHP Internals List Thread-Topic: [PHP-DEV] PCRE JIT broken in PHP 7.2 Thread-Index: AQHTMHFiyVG/LtLE6U2wt8r+IetjU6K61GP+gAAKzLo= Date: Mon, 18 Sep 2017 17:04:12 +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: [213.21.45.232] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BN6PR02MB2481;6:rWBSN22dVTPTT0xr8aYT+eXLvxNGFG/T6fL9YiYle6XAAwZGiIBLOJyc729ipoLEtxTV6+doTqcYhSphdGodZJi5KOvL1UzvpzyMtR0ucQBGY94kygS2unaPbL+L6GVheK4iLINh8CRXh1JZOfGvNQSjfwZ8ARb4pM4+H7tKsJnUpHazQTLmhDgKc2pF70TiUQRb5jUa+tDn++7E9CAQL2yvd/ZlX6MrMiDzq3wRSrZ0CCEXHtWs2cHPpq2JD+jdQWRGYK/KO3Zg2ZJQqDWs+dHjWB6D0jO6nHDN8iSh9IZ7jpEIRuwRePvjV/8biXZ5Oplks+pOMWHSlDjbNW7FBQ==;5:/LK+0yV3yazigKlk3OwCGqrA7enjQF8cICK/yK6dC1vcHbhNutZ1anXb4YVkKGpZxclxe7aeDVMFFR+8lu7UaTos/LUoWO2tAufE0smpdAwN2SiDv7niVUxII5FesJtiQDTX3f6ebAlqyKjutnSkFA==;24:9zPms6ZbtK8jvIlBCBk9CnHgMWofvBxCtbgFETGDUJ2mByPaZNYALjDc9oR7AX/ve7cc7zNi4IASxBmfW9lCnvmOEERO6RuWjXGEhmzisH0=;7:k0RveLLp7fn1NBZDUPcXTs330b0Tl36cLRBfLO+lGkIBuWgZEXl7Om2Vjrfv/niPPXLYODeMxreDWq9ccHq3TR1UcI05VU60Fndoaa/UDApQ/GkNeyuSQEwh/m+dPeXiK9EClrxRS8MPlRalbO+GXhEuHooapqqXP2lNd6I0oOM98aawgQYAvQe/8J5C80Kj8amp82cbbAXMN/m3nvWWKkes4KPO7NkEqZLHkIRZdKo= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 2f0ac197-b8f5-4b7a-910a-08d4feb7496b x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:BN6PR02MB2481; x-ms-traffictypediagnostic: BN6PR02MB2481: x-exchange-antispam-report-test: UriScan:(158342451672863)(166708455590820); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(3002001)(6041248)(20161123555025)(20161123558100)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BN6PR02MB2481;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BN6PR02MB2481; x-forefront-prvs: 04347F8039 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(376002)(346002)(199003)(377454003)(189002)(6116002)(3846002)(102836003)(74316002)(229853002)(7736002)(99286003)(2940100002)(77096006)(55016002)(53936002)(2950100002)(106356001)(606006)(53546010)(2906002)(9686003)(236005)(6306002)(54896002)(97736004)(101416001)(316002)(68736007)(50986999)(54356999)(76176999)(81166006)(8936002)(81156014)(8676002)(966005)(33656002)(478600001)(2900100001)(3280700002)(6506006)(14454004)(66066001)(189998001)(6436002)(53366004)(53376002)(86362001)(575784001)(3660700001)(105586002)(6246003)(5660300001)(25786009)(7696004)(217873001)(10090945008);DIR:OUT;SFP:1102;SCL:1;SRVR:BN6PR02MB2481;H:BN6PR02MB3234.namprd02.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: zend.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_BN6PR02MB3234140CF248D0177FDDA13DBF630BN6PR02MB3234namp_" MIME-Version: 1.0 X-OriginatorOrg: zend.com X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Sep 2017 17:04:12.8932 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 32210298-c08b-4829-8097-6b12c025a892 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR02MB2481 Subject: Re: [PHP-DEV] PCRE JIT broken in PHP 7.2 From: dmitry@zend.com (Dmitry Stogov) --_000_BN6PR02MB3234140CF248D0177FDDA13DBF630BN6PR02MB3234namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable This commit should fix the problem https://github.com/php/php-src/commit/5e= f10d08ec2d0823fb21ad189dacfb43d900a0b5 Thanks. Dmitry. ________________________________ From: Dmitry Stogov Sent: Monday, September 18, 2017 7:29:24 PM To: Giovanni Giacobbi; PHP Internals List Subject: Re: [PHP-DEV] PCRE JIT broken in PHP 7.2 [This sender failed our fraud detection checks and may not be who they appe= ar to be. Learn about spoofing at http://aka.ms/LearnAboutSpoofing] The problem may be caused by "incorrect" dynamic linking to different libpc= re instances. e.g one libbcre is use by Apache or some Apache module and another is embed= ded into PHP. The backtrace would be useful, to prove this guess. Thanks. Dmitry. ________________________________ From: giovanni.g@gmail.com on behalf of Giovanni Gia= cobbi Sent: Monday, September 18, 2017 2:28:35 PM To: PHP Internals List Subject: [PHP-DEV] PCRE JIT broken in PHP 7.2 Greetings, just an heads up, I started testing my project with PHP 7.2.0RC2 but it was causing a segmentation fault. I tracked down the problem to preg_match(), in particular when JIT is enabled and ONLY when running through Apache2 with event MPM. This problem does not occur with command line invocation. Here are the versions I tested, same environment: 7.1.9 works with PCRE JIT enabled 7.2.0alpha1 broken 7.2.0rc2 broken Build command line: ./configure \ --with-apxs2=3D/usr/local/apache2/bin/apxs \ --with-fpm-user=3Dhttpd \ --with-fpm-group=3Dhttpd \ --disable-cgi \ --enable-intl \ --with-layout=3DGNU \ --enable-maintainer-zts \ --with-gettext=3Dstatic \ --with-iconv \ --with-mysqli=3Dmysqlnd \ --enable-exif \ --with-openssl \ --with-curl The effect i observed is the following: var_dump(preg_match('/^a/', "a")); =3D> int(0) var_dump(preg_match('/a/', "a")); =3D> segmentation fault If you need any further information let me know. Kind regards -- Giovanni Giacobbi --_000_BN6PR02MB3234140CF248D0177FDDA13DBF630BN6PR02MB3234namp_--