X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B1765388A823 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1592856702; bh=x0s7pXAkljnJdnxE94I1S+fN4woM7+YzRFiszrU40zE=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=howUSDN7/XFIN9FxY4/t9KqjyGzEeFkQXErfOoxq1tJ8Vcbd3lqAcAxsbCqCZ0a2w ytn7SMUxMcnTn9ppvAzfg0hI8AIYBMbSgFLXxZztMNj5x2f3Zt40zeFPfyvnFaDf43 HP03/qWCJyUxWqx26U4vF6ZVb9G8DFOAZ35eZW3I= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3E2563851C0C ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Scs1e77nRcoyFMu6nIb6r8iWpbcOdUWoRrujkBcXrPpQHEPX2Om8tPrN+VUEFSuZ037vtQ1WX5MJp8DuauKJB64WdRzT/5583yxI3xNTWvHrfCP4Vvc4EUS/+g5Jdq1ga3tYE1S7orp4a0Bj8gWKCMyNEjFhm1lc4dYnq9Yc0xZeVFtFOgONkHmRr2ZQ2CCc5VuppPqduGSSoo/FIehPfezkKgyZxLJ+UrL47V3CkURpvKsh1OuvhXvpdj1Wu+O93Boeg7j7rngT/G6zTOm771lI9F1rj6oSPeigoKsAhZluZ53YHUqGhKL3IBCCY+dxEDbhc9DaUBnsm0G2UHUPdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1r17PziAIvJIUywK6gLZJel+Stfk+GXp7SyoCnwkR7s=; b=lrgqMzPI9V/+TbPjIGK1G7bRVSxAwzucj0l6+eAuNmF5sjSrrVEmxFQx5pWb0etXZQVXBytuQI6NKTQBjmaV0KoJqsRp8gbn0ZWkMvZVwhlIKIoBEBz92gQqvqnvDj2GUtba5wQdWQzSic/jBmxRyqhaQrjkFg+bzZSOL5xklp/bjrJCoOsrFRd6vT2sdI3gxwvCUQPQ4Ng8eQEM2CkXRL6YBLMAhxSNvuHh/4YDMUThN9wvd3fhML4gBPUfY9TvVtJoMXaN7TanSYoJIAGpG3SXVT5WrrHB2Pi96QtgJRQ4piav0YNm50f29SOyDtL/Wll6hAuNgM30hYr2XRLwwg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cornell.edu; dmarc=pass action=none header.from=cornell.edu; dkim=pass header.d=cornell.edu; arc=none Subject: Re: change in handling quotes in cygwin package from 3.1.4-1 to 3.1.5-1 To: Josh Thompson , cygwin AT cygwin DOT com References: <3394273 DOT JRUgpOGd2y AT dvr> Message-ID: Date: Mon, 22 Jun 2020 16:11:35 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 In-Reply-To: <3394273.JRUgpOGd2y@dvr> Content-Type: multipart/mixed; boundary="------------96A27C304660C1504F1346AA" Content-Language: en-US X-ClientProxiedBy: BL0PR05CA0014.namprd05.prod.outlook.com (2603:10b6:208:91::24) To MN2PR04MB6176.namprd04.prod.outlook.com (2603:10b6:208:e3::13) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.0.17] (68.175.129.7) by BL0PR05CA0014.namprd05.prod.outlook.com (2603:10b6:208:91::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.11 via Frontend Transport; Mon, 22 Jun 2020 20:11:35 +0000 X-Originating-IP: [68.175.129.7] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 34c94931-9e2f-422e-6b94-08d816e87745 X-MS-TrafficTypeDiagnostic: MN2PR04MB5487: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3276; X-Forefront-PRVS: 0442E569BC X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GZCkKdeNVfNNSam/cxOME1C2oo7BdcwWlkq5K85ySriRoAxhK/aBST45VBsN3UK3VCO7Fi7WPxR4gbECZRJdFiyeLqtRVrK4yINMIRWprX6jg5gS/Npw3FNAVVC81w94Vr4ll7taGY56rZiMXVFc9FON1AcQV8N766tKoBhJAyct20YnjwDn7GZ5Mwd1J/+EppViK76HD78t7UE19wJrfUaossgtBjU177gjdlUn5s+5loXGmmFtyx1KfmyY0YT+VfCPC3PWU48oKbV6JcqgQ+6xIP3rK5HkSVPz9bnLgijRw8Dk42q/o3hRtZlUbs1TJ1jK22TplwPH9EDEYZVI+fpiYM1PEmmufuXY+Or4VJIWiWbVwwHGJGv9mjKWEQCMWHspAc4ExTnKl8ukHeJ9BiJMKaJNX31+YXmW6hYJvXs= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR04MB6176.namprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(136003)(376002)(346002)(366004)(396003)(83380400001)(235185007)(5660300002)(31696002)(2616005)(31686004)(956004)(86362001)(2906002)(186003)(16526019)(8676002)(52116002)(66946007)(66556008)(66476007)(66576008)(4326008)(33964004)(26005)(53546011)(316002)(16576012)(75432002)(478600001)(36756003)(8936002)(6486002)(786003)(43740500002)(460985005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: N6ufIGMZaEGfQ/yYlpizLYn1o5Ct2toh1DMWqWcloLNBwBzn1DNpfQ1WKDtw3+SVVcHGFMYTU4VJ0gY4RjdnOGmBUhUv/PS96qcEPkciJMdjKWH+BJBo2rBol1BfwqovXDYcMHuDsLzSfYk/QFrfem4Xt8lcvnilVpNTFFMpiWFLDcIhCVQ0vpHbser26RxwSidLJiF24ZsB4Wi8/NxoPiaS776eBLIr7WT384x3vSLC4SDqEvoAelvUujgXTMy9EbU6dImGNfF31RRy8GtsTe0qHb6phA1wvACnIV964emiOyegrSZ/CMyraQWx/4LB44sa9SueGDoECLE51PWvM8glw/sX/SkHww4mL3F4+7RyS2nyP1Rj/wtvVt1NCgtYiSCrzciOFgKRNzg4GojKpXeB8+yBul5q/KIJvdSgT7BwoP/wsHoQ9B30ZfzF2iLBAO2xNnspWGwBUP+3LXCo8EgVfCi6hFmt6YQlP7vih4I= X-OriginatorOrg: cornell.edu X-MS-Exchange-CrossTenant-Network-Message-Id: 34c94931-9e2f-422e-6b94-08d816e87745 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2020 20:11:36.5205 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5d7e4366-1b9b-45cf-8e79-b14b27df46e1 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 0klFXyRXhyCPTjc0rB4U+7J1oJOOIqFawgevVNMSaXiI8wONXNxl8jpp0qB8iuY9cBlUHWrEhaOhofBeJ1HoOw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR04MB5487 X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Ken Brown via Cygwin Reply-To: Ken Brown Cc: dev AT vcl DOT apache DOT org Errors-To: cygwin-bounces AT cygwin DOT com Sender: "Cygwin" --------------96A27C304660C1504F1346AA Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit On 6/15/2020 12:21 PM, Josh Thompson wrote: > We recently noticed a change in double quote (") handling that is causing a > command we issue to fail. The command is: [...] > 3.1.4: > $ cmd.exe /c "echo \"" > " > > 3.1.5: > $ cmd.exe /c "echo \"" > \" I can confirm this change in behavior, and I thought it would be completely trivial to do a bisection to find the commit that caused it. Unfortunately, it seems that the issue is somehow tied up with the fact that the toolchain used for building the cygwin package was upgraded shortly after the release of 3.1.4. An attempt to rebuild 3.1.4 with the current toolchain fails because of some gcc/binutils changes. So I applied the attached patches, which were applied to the Cygwin git master shortly after the release of 3.1.4, in order to make the build succeed. After installing the rebuilt 3.1.4, however, the cmd.exe call above exhibits the "3.1.5" behavior rather than the "3.1.4" behavior. I can't see anything in the patches that would explain this. I thought maybe it was a compiler optimization problem, but rebuilding without optimization doesn't change anything. I'm stumped. Ken --------------96A27C304660C1504F1346AA Content-Type: text/plain; charset=UTF-8; name="0001-Cygwin-Makefile.in-add-fno-builtin-execve-CFLAG-when.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Cygwin-Makefile.in-add-fno-builtin-execve-CFLAG-when.pa"; filename*1="tch" From 5f66c2c756c2b3b43e565e471c82ee4ed05a4adb Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 26 Feb 2020 17:02:01 +0100 Subject: [PATCH] Cygwin: Makefile.in: add -fno-builtin-execve CFLAG when building exec.o gcc-9.2.0 has an execve builtin which uses the nothrow attribute. This results in an error when aliasing execve to _execve for newlib: exec.cc:88:23: error: 'int _execve(const char*, char* const*, char* const*)' specifies less restrictive attribute than its target 'int execve(const char*, char* const*, char* const*)': 'nothrow' [-Werror=missing-attributes] 88 | EXPORT_ALIAS (execve, _execve) /* For newlib */ Add the -fno-builtin-execve CFLAGS when building exec.o to override the gcc builtin. Signed-off-by: Corinna Vinschen --- winsup/cygwin/Makefile.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in index ca0633eb8..f273ba793 100644 --- a/winsup/cygwin/Makefile.in +++ b/winsup/cygwin/Makefile.in @@ -567,6 +567,8 @@ ifeq ($(target_cpu),i686) exceptions_CFLAGS:=-fno-omit-frame-pointer endif endif +# required since gcc 9.x +exec_CFLAGS:=-fno-builtin-execve fhandler_proc_CFLAGS+=-DUSERNAME="\"$(USER)\"" -DHOSTNAME="\"$(HOSTNAME)\"" fhandler_proc_CFLAGS+=-DGCC_VERSION="\"`$(CC) -v 2>&1 | tail -n 1`\"" -- 2.27.0 --------------96A27C304660C1504F1346AA Content-Type: text/plain; charset=UTF-8; name="0001-Cygwin-posix-timers-fix-uninitialized-variable.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Cygwin-posix-timers-fix-uninitialized-variable.patch" From 28382c97a5d5fd7366adbf7ce9445b1b4beb02a9 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 26 Feb 2020 16:50:34 +0100 Subject: [PATCH] Cygwin: posix timers: fix uninitialized variable The variable returning the overrun count from the tracker object after disarming the overrun counter was not correctly initialized. For some reason this has only been noticed by gcc-9.2.0, not by the formerly used gcc-7.4.0. This problem should not have had any runtime impact. The method timer_tracker::disarm_overrun_event is supposed to be called in lock-step with timer_tracker::arm_overrun_event, which in turn results in the variable getting a valid value. Signed-off-by: Corinna Vinschen --- winsup/cygwin/posix_timer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/posix_timer.cc b/winsup/cygwin/posix_timer.cc index c0d548fe9..75cd4fa60 100644 --- a/winsup/cygwin/posix_timer.cc +++ b/winsup/cygwin/posix_timer.cc @@ -81,7 +81,7 @@ timer_tracker::arm_overrun_event (LONG64 exp_cnt) LONG timer_tracker::disarm_overrun_event () { - LONG ret; + LONG ret = 0; AcquireSRWLockExclusive (&srwlock); if (overrun_count != OVR_DISARMED) -- 2.27.0 --------------96A27C304660C1504F1346AA Content-Type: text/plain; charset=UTF-8; name="0001-Cygwin-Update-dumper-for-bfd-API-changes.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Cygwin-Update-dumper-for-bfd-API-changes.patch" From ba2f251d439294c7087f3a38a8d407c95cdc5c1e Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Wed, 26 Feb 2020 18:48:51 +0000 Subject: [PATCH] Cygwin: Update dumper for bfd API changes Update dumper for bfd API changes in binutils 2.34 libbfd doesn't guarantee API stability, so we've just been lucky this hasn't broken more often. See binutils commit fd361982. --- winsup/utils/dumper.cc | 30 ++++++++++++++++++++++-------- winsup/utils/parse_pe.cc | 4 ++++ 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/winsup/utils/dumper.cc b/winsup/utils/dumper.cc index f71bdda8b..226c2283d 100644 --- a/winsup/utils/dumper.cc +++ b/winsup/utils/dumper.cc @@ -39,6 +39,20 @@ #define NOTE_NAME_SIZE 16 +#ifdef bfd_get_section_size +/* for bfd < 2.34 */ +#define get_section_name(abfd, sect) bfd_get_section_name (abfd, sect) +#define get_section_size(sect) bfd_get_section_size(sect) +#define set_section_size(abfd, sect, size) bfd_set_section_size(abfd, sect, size) +#define set_section_flags(abfd, sect, flags) bfd_set_section_flags(abfd, sect, flags) +#else +/* otherwise bfd >= 2.34 */ +#define get_section_name(afbd, sect) bfd_section_name (sect) +#define get_section_size(sect) bfd_section_size(sect) +#define set_section_size(abfd, sect, size) bfd_set_section_size(sect, size) +#define set_section_flags(abfd, sect, flags) bfd_set_section_flags(sect, flags) +#endif + typedef struct _note_header { Elf_External_Note elf_note_header; @@ -131,7 +145,7 @@ dumper::sane () void print_section_name (bfd* abfd, asection* sect, PTR obj) { - deb_printf (" %s", bfd_get_section_name (abfd, sect)); + deb_printf (" %s", get_section_name (abfd, sect)); } void @@ -712,10 +726,10 @@ dumper::prepare_core_dump () if (p->type == pr_ent_module && status_section != NULL) { - if (!bfd_set_section_size (core_bfd, - status_section, - (bfd_get_section_size (status_section) - + sect_size))) + if (!set_section_size (core_bfd, + status_section, + (get_section_size (status_section) + + sect_size))) { bfd_perror ("resizing status section"); goto failed; @@ -738,8 +752,8 @@ dumper::prepare_core_dump () goto failed; } - if (!bfd_set_section_flags (core_bfd, new_section, sect_flags) || - !bfd_set_section_size (core_bfd, new_section, sect_size)) + if (!set_section_flags (core_bfd, new_section, sect_flags) || + !set_section_size (core_bfd, new_section, sect_size)) { bfd_perror ("setting section attributes"); goto failed; @@ -823,7 +837,7 @@ dumper::write_core_dump () deb_printf ("writing section type=%u base=%p size=%p flags=%08x\n", p->type, p->section->vma, - bfd_get_section_size (p->section), + get_section_size (p->section), p->section->flags); switch (p->type) diff --git a/winsup/utils/parse_pe.cc b/winsup/utils/parse_pe.cc index 2a388638c..90b5c0b0d 100644 --- a/winsup/utils/parse_pe.cc +++ b/winsup/utils/parse_pe.cc @@ -25,6 +25,10 @@ #include "dumper.h" +#ifndef bfd_get_section_size +#define bfd_get_section_size(sect) bfd_section_size(sect) +#endif + int exclusion::add (LPBYTE mem_base, SIZE_T mem_size) { -- 2.27.0 --------------96A27C304660C1504F1346AA Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple --------------96A27C304660C1504F1346AA--