From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 121039 invoked by alias); 22 May 2017 18:38:35 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 120970 invoked by uid 89); 22 May 2017 18:38:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy=prep, downloading, UD:php X-HELO: mail-wm0-f68.google.com Received: from mail-wm0-f68.google.com (HELO mail-wm0-f68.google.com) (74.125.82.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 22 May 2017 18:38:32 +0000 Received: by mail-wm0-f68.google.com with SMTP id d127so34805161wmf.1 for ; Mon, 22 May 2017 11:38:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=ETNZ5pjOtUe6FXxctbcHH616kVnmVNo32/YsCyMne/8=; b=umlZKpGcXxEdBroGfEVkue7IqNwwfJu+0J36kha4JEkzZjNw4vUeDel8MMnIR5BtlF aULbMLAW2gfsuubXl7FKe31Cf0m27eS+WAOo2rnjrXQwrRa2wQG91fXLNUQwimZvtDxm 56JqVvCAlwBJQCYl+zCACxk+Go9ri4fKDicMpNm1S9+Pmg5be9e9K6MkoA6rioSZktbm qpS2gEqLNCaYYrjBo5b+o7rM4fFfu80zbZVADrmoGTtiO4gt15N893NWjOEYgU2XEcw1 MF1OCoMYUFJKYi9WUf94xhnumwxGDNRWg+GKdovbmLF57mi0iBE5gDtExcLTc9oU4Kgr Cexg== X-Gm-Message-State: AODbwcDA5yN/Mmcrz5bABT8eunZVTP6GPd9nYzt2Yy8+sDRhZYxIEkSu iEA70PvwuvrfVU5EamM= X-Received: by 10.28.109.195 with SMTP id b64mr1183256wmi.46.1495478313543; Mon, 22 May 2017 11:38:33 -0700 (PDT) Received: from [192.168.1.6] (79-67-178-202.dynamic.dsl.as9105.com. [79.67.178.202]) by smtp.gmail.com with ESMTPSA id 2sm34368725wmk.20.2017.05.22.11.38.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 May 2017 11:38:32 -0700 (PDT) From: Richard H Lee Subject: Re: Composer segfault on multiple configurations To: cygwin@cygwin.com References: Message-ID: Date: Mon, 22 May 2017 19:54:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------3B4A87F4E885148F84806326" X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg00351.txt.bz2 --------------3B4A87F4E885148F84806326 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-length: 3102 On 18/05/2017 08:42, Sky Diver wrote: > I may compile php from cygports Just in case Sky Diver or anyone else is interested in compiling php from Cygports, here are some simple steps to do so. It's not really difficult and most of the time it takes up is downloading the packages and compiling php. You'll probably want to do the compilation step during a lunch break or something. If you just want to get a patched php running, just skip to the steps below. But I'm also putting putting these instructions out here in case anyone wants to do some testing. The php devs asked for confirmation that (a) the bug exists and (b) this patch actually fixes it, before committing the patch. The devs ask this as they have had problems setting up a dev environment for php. So they are unable recreate this bug or test the patch themselves. This is why I feel any Cygwin-specific patches for php should, for the moment be submitted to Cygwin rather than going to php. To recreate the bug, create a 4096 bytes php file. $ for i in $(seq 4096); do echo; done > test.php Then execute it. $ php test.php This should immediately segfault. You can also test it through apache as there are two ways this bug can occur, through the php cli and through the apache php module. That is why the patch is against two different points in the source. By running apache in debug mode, you can see when the segfault occurs. $ /usr/sbin/apachectl -X Steps ===== 1. Install the php source from cygwin Install php from the Cygwin installer as normal, except check the Src checkbox as well as the Bin checkbox. 2. cd into the source directory $ cd /usr/src/php-7.0.19-1.src 3. Copy the attachments over in that directory - dependencies - php-7.0.19-page-size.patch - php-cygport-page-size.patch 5. Install the dependencies There are 59 packages required to build php with cygport, listed in the attachment "dependencies". You'll probably use the command line for this rather than manually pick out the packages by hand in Cygwin's setup. You can either use setup's command line -P option or apt-cyg. I used apt-cyg, so for me I run: $ xargs apt-cyg install < dependencies It will take a while to download all these packages. 4. Patch the cygport file $ patch < php-cygport-page-size.patch 6. Prepare the source for compilation $ cygport php.cygport prep 7. Compile php $ cygport php.cygport compile Depending on your cpu, this will take a significant amount of time. 8. Install your compiled php into a staging directory $ cygport php.cygport install 9. Copy the files over from staging into root $ rsync -varlI php-7.0.19-1.x86_64/inst/. / 10. Rebase the dlls in cygwin $ rebase-trigger full Exit all Cygwin processes, command line and services. Run Cygwin's setup to actually perform the rebase. If you rerun "php test.php" you now should get 4096 newlines instead of a segfault. Should the patch miss php 7.0.20 or whatever the next version of php is for Cygwin, you can rerun the steps and just change the path names in steps 2 and 9. But hopefully the path will be merged in by then. --------------3B4A87F4E885148F84806326 Content-Type: text/plain; charset=UTF-8; name="php-7.0.19-page-size.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="php-7.0.19-page-size.patch" Content-length: 1172 ZGlmZiAtLWdpdCBhL1plbmQvemVuZF9zdHJlYW0uYyBiL1plbmQvemVuZF9z dHJlYW0uYwppbmRleCAzZmQ3ZmEwLi5mNWI5YmVhIDEwMDY0NAotLS0gYS9a ZW5kL3plbmRfc3RyZWFtLmMKKysrIGIvWmVuZC96ZW5kX3N0cmVhbS5jCkBA IC0zMCw3ICszMCwxMSBAQAogIyBpZiBIQVZFX1VOSVNURF9ICiAjICBpbmNs dWRlIDx1bmlzdGQuaD4KICMgIGlmIGRlZmluZWQoX1NDX1BBR0VTSVpFKQor IyAgIGlmZGVmIF9fQ1lHV0lOX18KKyMgICAgZGVmaW5lIFJFQUxfUEFHRV9T SVpFIDQwOTYKKyMgICBlbHNlCiAjICAgIGRlZmluZSBSRUFMX1BBR0VfU0la RSBzeXNjb25mKF9TQ19QQUdFU0laRSk7CisjICAgZW5kaWYKICMgIGVsaWYg ZGVmaW5lZChfU0NfUEFHRV9TSVpFKQogIyAgICBkZWZpbmUgUkVBTF9QQUdF X1NJWkUgc3lzY29uZihfU0NfUEFHRV9TSVpFKTsKICMgIGVuZGlmCmRpZmYg LS1naXQgYS9tYWluL21haW4uYyBiL21haW4vbWFpbi5jCmluZGV4IDAxZWQz YTYuLjA5MDkzMDkgMTAwNjQ0Ci0tLSBhL21haW4vbWFpbi5jCisrKyBiL21h aW4vbWFpbi5jCkBAIC05Niw3ICs5NiwxMSBAQAogIyBpZiBIQVZFX1VOSVNU RF9ICiAjICBpbmNsdWRlIDx1bmlzdGQuaD4KICMgIGlmIGRlZmluZWQoX1ND X1BBR0VTSVpFKQorIyAgIGlmZGVmIF9fQ1lHV0lOX18KKyMgICAgZGVmaW5l IFJFQUxfUEFHRV9TSVpFIDQwOTYKKyMgICBlbHNlCiAjICAgIGRlZmluZSBS RUFMX1BBR0VfU0laRSBzeXNjb25mKF9TQ19QQUdFU0laRSk7CisjICAgZW5k aWYKICMgIGVsaWYgZGVmaW5lZChfU0NfUEFHRV9TSVpFKQogIyAgICBkZWZp bmUgUkVBTF9QQUdFX1NJWkUgc3lzY29uZihfU0NfUEFHRV9TSVpFKTsKICMg IGVuZGlmCg== --------------3B4A87F4E885148F84806326 Content-Type: text/plain; charset=UTF-8; name="php-cygport-page-size.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="php-cygport-page-size.patch" Content-length: 501 LS0tIHBocC5jeWdwb3J0CTIwMTctMDUtMTQgMDk6Mjc6MDQuMDAwMDAwMDAw ICswMTAwCisrKyBwaHAtbmV3LmN5Z3BvcnQJMjAxNy0wNS0yMCAxODoxODo0 NS45Mzc4MjM2MDAgKzAxMDAKQEAgLTM1LDYgKzM1LDcgQEAKIAk1LjYuNi1m aXgtbGlidG9vbGl6ZS5wYXRjaAogCTUuNi45LWFwYWNoZTJoYW5kbGVyLXp0 cy5wYXRjaAogCTcuMC4xNy1wY3JlLWppdC1vZmYucGF0Y2gKKwlwaHAtNy4w LjE5LXBhZ2Utc2l6ZS5wYXRjaAogIgogCiBESUZGX0VYQ0xVREVTPSJhY2xv Y2FsLm00IGNvbmZpZ3VyZSBnZW5lcmF0ZWRfbGlzdHMgbGlidG9vbC5tNCBs dCoubTQgbHRtYWluLnNoIHBocF9jb25maWcuaC5pbiBwaHBfdmVyc2lvbi5o IHRlc3RzIgo= --------------3B4A87F4E885148F84806326 Content-Type: text/plain; charset=UTF-8; name="dependencies" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="dependencies" Content-length: 1168 YXBhY2hlMi1kZXZlbApjLWNsaWVudApjeWdwb3J0CmxpYmFzcGVsbC1kZXZl bApsaWJhdHRyLWRldmVsCmxpYmNyb2NvMC42LWRldmVsCmxpYmN1cmwtZGV2 ZWwKbGliZWRpdC1kZXZlbApsaWJlbmNoYW50LWRldmVsCmxpYmZhbS1kZXZl bApsaWJmZmktZGV2ZWwKbGliZ2QtZGV2ZWwKbGliZ2RibS1kZXZlbApsaWJn bGFwaS1kZXZlbApsaWJnbnV0bHMtZGV2ZWwKbGliZ3MtZGV2ZWwKbGliZ3Rr Mi4wLWRldmVsCmxpYmd0cy1kZXZlbApsaWJndWlsZTEuOC1kZXZlbApsaWJn dWlsZTIuMC1kZXZlbApsaWJndmMtZGV2ZWwKbGliaHVuc3BlbGwtZGV2ZWwK bGliaWN1LWRldmVsCmxpYmlkbjItZGV2ZWwKbGliaXNsLWRldmVsCmxpYmph c3Blci1kZXZlbApsaWJrcmI1LWRldmVsCmxpYkxBU2ktZGV2ZWwKbGlibGNt cy1kZXZlbApsaWJsbHZtLWRldmVsCmxpYmx6bzItZGV2ZWwKbGlibWNyeXB0 LWRldmVsCmxpYm1pbmctZGV2ZWwKbGlibXBjLWRldmVsCmxpYm1wZnItZGV2 ZWwKbGlibmdodHRwMi1kZXZlbApsaWJuc3MtZGV2ZWwKbGlib25pZy1kZXZl bApsaWJvcGVuanAyLWRldmVsCmxpYm9wZW5qcGVnLWRldmVsCmxpYnBuZzEy LWRldmVsCmxpYnBvcHBsZXItZGV2ZWwKbGlicHEtZGV2ZWwKbGlicHNsLWRl dmVsCmxpYnJlYWRsaW5lLWRldmVsCmxpYnJzdmcyLWRldmVsCmxpYnNpZ3Nl Z3YtZGV2ZWwKbGlic3FsaXRlMy1kZXZlbApsaWJzc2gyLWRldmVsCmxpYnN5 YmRiLWRldmVsCmxpYnRoYWktZGV2ZWwKbGlidGlkeS1kZXZlbApsaWJ0eGNf ZHh0bi1kZXZlbApsaWJ1bmlzdHJpbmctZGV2ZWwKbGlidm9pa2tvLWRldmVs CmxpYndlYnAtZGV2ZWwKbGlieHNsdC1kZXZlbApsaWJ6aXAtZGV2ZWwKcmVj b2RlCg== --------------3B4A87F4E885148F84806326 Content-Type: text/plain; charset=us-ascii Content-length: 219 -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple --------------3B4A87F4E885148F84806326--