From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.66]) by sourceware.org (Postfix) with ESMTPS id 7D2203858C83 for ; Sat, 29 Oct 2022 21:37:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7D2203858C83 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=posteo.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=posteo.net Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 9959C240101 for ; Sat, 29 Oct 2022 23:37:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1667079434; bh=chTya8VN7RF/5S6EpHQNYLcVOJ7SRoHzx4sD8vBtaSY=; h=Subject:From:To:Date:From; b=qiEKhFo0qQ3xnFE4mbRQgPw/N/XilNHxFg4gHZ+7a5CIxNjTN2GazAq1a9t7LH7Sm 2fzNhK/GpoXa/1R145o+pzUJV7BZn7V7A2Ompwbbb/H6X048jA2/hUf6X9LR7nBjUA +lQug5fNTRj7YFnregj6stVu2WNz12UkOgs8kLTqykoNrn2YPaFm6yxk2nOoKIiCqu hECzHDDwOAuB/kbdwtvkbDASE+meMqNvWnc80jpSyDs2FWNmkAdnsaTeInnZz+/Pp/ afAAIzfrAnn66Ykt/jpjhQ06VVOzOb7IckydkH1MYZJ7U/zGrOFhAgtXm38m06cRlE 1Zg8Mz9yVFlrg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N0CRs2z1jz9rxG for ; Sat, 29 Oct 2022 23:37:12 +0200 (CEST) Message-ID: Subject: Help with a hang in snprintf() for sh-elf From: John Scott To: crossgcc@sourceware.org Date: Sat, 29 Oct 2022 21:37:05 +0000 Jabber-ID: pert@member.fsf.org Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-zjT0NcnM4Ea67VOi6ZD9" MIME-Version: 1.0 X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --=-zjT0NcnM4Ea67VOi6ZD9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 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/late= st/debian/rules I ran into this hang running the Newlib test suite. --=-zjT0NcnM4Ea67VOi6ZD9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iIgEABYIADAWIQSiPzylvTnZ6xisfzWz9N0oYfTNugUCY12dAhIcanNjb3R0QHBv c3Rlby5uZXQACgkQs/TdKGH0zbrODQEAtfxB0/W22Q8o6b3e6GT34k8/Lg8ZrKl7 msgfvANdJjABAM+0Lq6vieSNoLSdbuyrHZQweur55jfR6Eb2+mC5zlEE =KYLF -----END PGP SIGNATURE----- --=-zjT0NcnM4Ea67VOi6ZD9--