www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2022/08/11/20:13:23

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
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
Date: Fri, 12 Aug 2022 10:11:51 +1000
From: Tony Cook <tony AT develop-help DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: crash in newlocale()
Message-ID: <YvWax9O8RkNSrn1r@venus.tony.develop-help.com>
References: <YvRbeAzxwtYwhkkE AT venus DOT tony DOT develop-help DOT com>
<63b86f9c-df1e-e522-820a-755ba475f4cd AT cornell DOT edu>
MIME-Version: 1.0
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 AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

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 AT enceladus ~/dev/perl/git
> > $ cat newlocale-test.c
> > #include <locale.h>
> > #include <stdio.h>
> > 
> > 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 AT enceladus ~/dev/perl/git
> > $ gcc -onewlocale-test -g newlocale-test.c
> > 
> > tony AT 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

-- 
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019