From: John Scott <jscott@posteo.net>
To: crossgcc@sourceware.org
Subject: Help with a hang in snprintf() for sh-elf
Date: Sat, 29 Oct 2022 21:37:05 +0000 [thread overview]
Message-ID: <c943a5e03922fc555c4a2a6a2a468b9428a4b2ec.camel@posteo.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 671 bytes --]
Hi,
I'm the maintainer of gcc-sh-elf for Debian, and I'm curious why the
following program seems to hang with GCC 12, Newlib 3.3.0, and Binutils
2.37, running the program under the appropriate simulator from GDB:
$ cat test.c
#include <stdio.h>
int main(void) {
snprintf(NULL, 0, "%lf", 1.0);
}
$ sh-elf-gcc test.c
$ sh-elf-run a.out
$ # hangs
Note that if the floating point number is changed to 0.0, the hang
doesn't happen anymore.
The recipe used to build this cross toolchain can be seen at
https://salsa.debian.org/electronics-team/toolchains/gcc-sh-elf/-/blob/latest/debian/rules
I ran into this hang running the Newlib test suite.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
reply other threads:[~2022-10-29 21:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=c943a5e03922fc555c4a2a6a2a468b9428a4b2ec.camel@posteo.net \
--to=jscott@posteo.net \
--cc=crossgcc@sourceware.org \
/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).