From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from venus.tony.develop-help.com (develop-help.com [220.233.67.40]) by sourceware.org (Postfix) with ESMTPS id DD288385740E for ; Fri, 12 Aug 2022 00:11:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DD288385740E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=develop-help.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=develop-help.com Received: from venus.tony.develop-help.com (localhost [127.0.0.1]) by venus.tony.develop-help.com (8.15.2/8.15.2/Debian-22) with ESMTP id 27C0BplM2605869 for ; Fri, 12 Aug 2022 10:11:51 +1000 Received: (from tony@localhost) by venus.tony.develop-help.com (8.15.2/8.15.2/Submit) id 27C0BpWi2605868 for cygwin@cygwin.com; Fri, 12 Aug 2022 10:11:51 +1000 Date: Fri, 12 Aug 2022 10:11:51 +1000 From: Tony Cook To: cygwin@cygwin.com Subject: Re: crash in newlocale() Message-ID: References: <63b86f9c-df1e-e522-820a-755ba475f4cd@cornell.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <63b86f9c-df1e-e522-820a-755ba475f4cd@cornell.edu> X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: cygwin@cygwin.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: , X-List-Received-Date: Fri, 12 Aug 2022 00:12:01 -0000 On Thu, Aug 11, 2022 at 09:13:21AM -0400, Ken Brown wrote: > On 8/10/2022 9:29 PM, Tony Cook wrote: > > While I get a SEGV from miniperl, a simple reproducer returns a > > SIGTRAP: > > > > tony@enceladus ~/dev/perl/git > > $ cat newlocale-test.c > > #include > > #include > > > > int main() { > > locale_t st = newlocale(LC_ALL_MASK, "C", (locale_t)0); > > > > locale_t st2 = newlocale(LC_CTYPE_MASK, "en_US.UTF-8", st); > > printf("Done\n"); > > return 0; > > } > > tony@enceladus ~/dev/perl/git > > $ gcc -onewlocale-test -g newlocale-test.c > > > > tony@enceladus ~/dev/perl/git > > $ gdb ./newlocale-test.exe > > GNU gdb (GDB) (Cygwin 11.2-1) 11.2 > [...] > > Reading symbols from ./newlocale-test.exe... > > (gdb) r > > Starting program: /home/tony/dev/perl/git/newlocale-test.exe > > [New Thread 9176.0x3a8c] > > [New Thread 9176.0x2014] > > [New Thread 9176.0x2bc4] > > [Thread 9176.0x2014 exited with code 3221225477] > > [Thread 9176.0x3a8c exited with code 3221225477] > > [Thread 9176.0x2bc4 exited with code 3221225477] > > > > Program terminated with signal SIGTRAP, Trace/breakpoint trap. > > The program no longer exists. > > I can't explain the SIGTRAP (but you'll find a lot of information if you > search the internet). But I don't think it necessarily indicates a problem > with newlocale. What happens if you just run your test program normally, > not under gdb? It works fine for me: > > $ ./newlocale-test.exe > > $ echo $? > 0 Where is the "Done"? Tony