public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Tony Cook <tony@develop-help.com>
To: cygwin@cygwin.com
Subject: Re: crash in newlocale()
Date: Fri, 12 Aug 2022 10:11:51 +1000	[thread overview]
Message-ID: <YvWax9O8RkNSrn1r@venus.tony.develop-help.com> (raw)
In-Reply-To: <63b86f9c-df1e-e522-820a-755ba475f4cd@cornell.edu>

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

  reply	other threads:[~2022-08-12  0:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-11  1:29 Tony Cook
2022-08-11 12:18 ` Takashi Yano
2022-08-11 17:35   ` Corinna Vinschen
2022-08-11 23:38     ` Takashi Yano
2022-08-12 10:50       ` Corinna Vinschen
2022-08-11 13:13 ` Ken Brown
2022-08-12  0:11   ` Tony Cook [this message]
2022-08-12  1:12     ` Ken Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YvWax9O8RkNSrn1r@venus.tony.develop-help.com \
    --to=tony@develop-help.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).