From unknown Sat Jun 21 03:27:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#77771: coreutils 9.7 printf crashes on Solaris 11 Resent-From: Bruno Haible Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Sat, 12 Apr 2025 21:17:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 77771 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 77771@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.174449258322860 (code B ref -1); Sat, 12 Apr 2025 21:17:04 +0000 Received: (at submit) by debbugs.gnu.org; 12 Apr 2025 21:16:23 +0000 Received: from localhost ([127.0.0.1]:32937 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u3iD9-0005we-7S for submit@debbugs.gnu.org; Sat, 12 Apr 2025 17:16:23 -0400 Received: from lists.gnu.org ([2001:470:142::17]:60120) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u3iD7-0005wN-PR for submit@debbugs.gnu.org; Sat, 12 Apr 2025 17:16:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u3iD2-00046Y-Ch for bug-coreutils@gnu.org; Sat, 12 Apr 2025 17:16:16 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([85.215.255.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u3iCz-0006xp-JA for bug-coreutils@gnu.org; Sat, 12 Apr 2025 17:16:16 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1744492570; cv=none; d=strato.com; s=strato-dkim-0002; b=QJXmQkLkBNTYaCD4cA/tBu9AmfL27eV8Cs+UeZ5GrNpdnxBDE4UWYXioKo8iyvBoFz rFuffqQQG9x9ZEGv9E7DUSRp/MGLZ8gWekCKGdEf40tElZzG1q4KdAncdtvP8fA3ylWJ MbV2yPjRg5IXc86Yv9zL0hyY6hu7HW6sDh1/Mg15Jly0br4fZ0rr1btesc961dA+3O3W 9kErKRwQkUgXRvG1RmPfyPvT9SYf+Qt9UBLfFYd9TvBoILoXNfPbBKqqZd/q4wmrkZTS whoepuU5VcZqqTZLxdVmWKWJBuSyuPFKQYbHru/6zcdkH4dMgdd5K8v2c1SxsorZtkjv cVcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1744492570; s=strato-dkim-0002; d=strato.com; h=Message-ID:Date:Subject:To:From:Cc:Date:From:Subject:Sender; bh=r+1KJcJczJnY/gL6aky7nDgesnq9ZkqfHH15WdSLmnU=; b=JxJJoNRI76OGfCOPRK6T2gfwyb8TMs4ETbOknZFZYdmuzE5HERGNnnpwPAIfeDNELd ITx0D/oL7ajw4jpk8zM7VeKrt2pVY0NgP+qdq7WbLQ0PJgRapgqohFwRgGiE2sDk0yHr pz1s7iaJHSH/7PrsyBPKNM6LraFWFVtAeH0ItnXlespxrE7FKdkLfPpxlW9b/TVSyTDS eksqdSsbPaQUGBarm13+IVEtDjiftC+f/RRCOEtUrrVWXKfjjbJX230XRivv0QABcAZZ icsLgAXeRHn3qs5IqgCZAS17jPHP9w7RFs27gD6hXbeymecjJYWDI3fIDB78hL48NG6P RcUg== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1744492570; s=strato-dkim-0002; d=clisp.org; h=Message-ID:Date:Subject:To:From:Cc:Date:From:Subject:Sender; bh=r+1KJcJczJnY/gL6aky7nDgesnq9ZkqfHH15WdSLmnU=; b=JtcPsDf+dQXpU413x14ur732viSmbmPNd3vd20NmObi0LrD2EaREIfHWjH+U6DhYZ6 f+m8Rcb1d+YnqtdqUTtKEtzj+YDCfE2Vjond+8ic2lE1BFDZpc2W0fr/2e8FNPaOd/7e ubdsO0gv1lqtECt48+NepFH9mabdwKwjAKAAHmb6DfNEdgGtmjmpr6z34I+dr+kp7Ank +K+CSrfEnCJ2MKGIRWGBszyuQ+mB14pNCJAb6x6kK6YJodgXpwL/+AGPPuGGmqURkk1s de/cDgG6qng5husgn9AqZmYvCzDUt7kYJXOA5LT+gOVu9+6IOP7lVtiESNFX2oEfFhLI 730Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1744492570; s=strato-dkim-0003; d=clisp.org; h=Message-ID:Date:Subject:To:From:Cc:Date:From:Subject:Sender; bh=r+1KJcJczJnY/gL6aky7nDgesnq9ZkqfHH15WdSLmnU=; b=tqdJHJ5vnbffbnWOqktPd1lEVkAipkN4dmSmXBMQps5PFRDhfAC62qBzs6OIRHC4/B 1FiQ6Fdv3XGPHLGMyCDA== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlLnY4jECd2hdUURIbZgL8PX2QiTuZ3cdB8X/nqj+bFWiSBYTlmlIfRYFx1bhHOv6m" Received: from nimes.localnet by smtp.strato.de (RZmta 51.3.0 AUTH) with ESMTPSA id N7dcf813CLGAlNt (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Sat, 12 Apr 2025 23:16:10 +0200 (CEST) From: Bruno Haible Date: Sat, 12 Apr 2025 23:16:10 +0200 Message-ID: <3662750.o7rAqR3Ra6@nimes> Organization: GNU MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart5457072.Zugxlq0yvN" Content-Transfer-Encoding: 7Bit Received-SPF: none client-ip=85.215.255.20; envelope-from=bruno@clisp.org; helo=mo4-p00-ob.smtp.rzone.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This is a multi-part message in MIME format. --nextPart5457072.Zugxlq0yvN Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Running the attached script on Solaris 11.4 or Solaris 11 OpenIndiana, in the coreutils-9.7 build tree, produces a crash: $ sh ~/cmd 42 351 ... 4 235 ... 42 351 ... /home/bruno/cmd: line 4: 18141: Memory fault(coredump) Segmentation Fault (core dumped) What triggers the crash is a %'g directive that produces a large number of digits. The gdb stack trace shows the location: inside function insert_thousands_sep in /lib/64/libc.so.1. --nextPart5457072.Zugxlq0yvN Content-Disposition: attachment; filename="cmd" Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="x-UTF_8J"; name="cmd" LC_ALL=fr_FR.UTF-8 ./printf "%'.50g\\n" 42351647362715016953416125033982098102569580078125 LC_ALL=fr_FR.UTF-8 ./printf "%'.100g\\n" 4235164736271501695341612503398209810256958007812500000000000000000000000000000000000000000000000000 LC_ALL=fr_FR.UTF-8 ./printf "%'.200g\\n" 42351647362715016953416125033982098102569580078125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 LC_ALL=fr_FR.UTF-8 ./printf "%'.500g\\n" 42351647362715016953416125033982098102569580078125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 --nextPart5457072.Zugxlq0yvN-- From unknown Sat Jun 21 03:27:00 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Bruno Haible Subject: bug#77771: closed (Re: coreutils 9.7 printf crashes on Solaris 11) Message-ID: References: <1834142.axiByQ7kbq@nimes> <3662750.o7rAqR3Ra6@nimes> X-Gnu-PR-Message: they-closed 77771 X-Gnu-PR-Package: coreutils Reply-To: 77771@debbugs.gnu.org Date: Sat, 12 Apr 2025 21:24:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1744493042-26436-1" This is a multi-part message in MIME format... ------------=_1744493042-26436-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #77771: coreutils 9.7 printf crashes on Solaris 11 which was filed against the coreutils package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 77771@debbugs.gnu.org. --=20 77771: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D77771 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1744493042-26436-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 77771-done) by debbugs.gnu.org; 12 Apr 2025 21:23:17 +0000 Received: from localhost ([127.0.0.1]:33056 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u3iJp-0006lr-5Z for submit@debbugs.gnu.org; Sat, 12 Apr 2025 17:23:17 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.162]:42119) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u3iJm-0006lN-MU for 77771-done@debbugs.gnu.org; Sat, 12 Apr 2025 17:23:16 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1744492992; cv=none; d=strato.com; s=strato-dkim-0002; b=NBT3giwsIrbX2z5ZQWyR4kDOViSpnnRTIE25mypg/OIFiZSkI0O8ThKIS6XD/DvKI7 REuYhzqAQo5NeBJPNo83mzUqTOx/pxbO0ZbsF4CleB/Md5hzah6wdSHhJJS50vbgNoJp VCmMudpDzuw27qiZArxIapCuZUMSDByAtXVxGu9R4sGxkMqfml0n2SMckXrjFs9dvZnz yVXSyf/pIqzSMZWo3qoiv2BBqZyuuAC0R8coiIQPkvvznp2jEQRHqTLYz6w2wIFm0CSs 8UOVls89p/8o/lc72BMDhu3Ng8lSaKdXX7P6N2aV0WeL3FI/LT5a8ymF8J7qoPaA4qIO f7DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1744492992; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-ID:Date:Subject:To:From:Cc:Date:From: Subject:Sender; bh=SAvHdD1OuZGL/3D/zctsMwCZhtcVMNeaHZgtrUH2S6M=; b=LpKc8u+y/6Us4GqPSH/5YNFm1KEajYpuCBVQFv9V8IEYgNy0/2ERQLBUvdCqk7xPA1 Ou+uKmHRfXrVT9V5Q+2jB9GIUAPIT731MOJOXSpBiQeeTpT4PigYBrq3FBmdjd56Olii xMu+/BevAM1Xl5joDexAx1F/5ayzy2vCcC8R3wBNv6o38IO7bzMiR01+tilFuoEeTUGE ilJ1h5qA/5aAk5KHKpZP4CM0nytvSj9R08KHF7gPs/kZL0mbmqrpNLv7PwP+l4LAnSoo L+bM7AdY/L0c5/XKOT245/HmlkaL55X42OyXN8cYxmQ9Gsb997Gey3/yVFfNQm7/dVX7 1BkQ== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1744492992; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:To:From:Cc:Date:From: Subject:Sender; bh=SAvHdD1OuZGL/3D/zctsMwCZhtcVMNeaHZgtrUH2S6M=; b=LYMUN5skPcsdWCaZipuLGkWOfOa/n4E2svB3AmJP24m8ro6E6CL0E6om7P4kAa6dS5 t4i78GmYIAuC2FBwls/fpJHMET6IX8jgKpLoiZibc265PcbKsU2Kc17E5pxL/l3W8ZkZ XEvLsMlYRCaosqJKO/jJ2/JkdDx/1MNxnsqtjE+/gxfVRQz8+kf1JupD0nNZxGorZRAb qXPIYDdKGQqc9gguNvaHbxcWWPecoM4jrblvDfjzcpWighevkQ+VfO6vjyZc0+v+rKj6 zkLDt6t2wqOFT2ObXw4d07FPXfQYGwJGZhEaGdDMWEqIkUzPZxCiASPXMfQ+5Xp/5V8G t4rQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1744492992; s=strato-dkim-0003; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:To:From:Cc:Date:From: Subject:Sender; bh=SAvHdD1OuZGL/3D/zctsMwCZhtcVMNeaHZgtrUH2S6M=; b=0TfBhpDXwfkWgIVTTRskhLJO8P95p61l3hG5NHcqZR8pA6Kq/8pQUcIXGMsRq2MTtR Ut5n+VSouieU3AdkjxAg== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlLnY4jECd2hdUURIbZgL8PX2QiTuZ3cdB8X/nqj+bFWiSBYTlmlIfRYFx1bhHOv6m" Received: from nimes.localnet by smtp.strato.de (RZmta 51.3.0 AUTH) with ESMTPSA id N7dcf813CLNClOS (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Sat, 12 Apr 2025 23:23:12 +0200 (CEST) From: Bruno Haible To: 77771-done@debbugs.gnu.org Subject: Re: coreutils 9.7 printf crashes on Solaris 11 Date: Sat, 12 Apr 2025 23:23:12 +0200 Message-ID: <1834142.axiByQ7kbq@nimes> Organization: GNU In-Reply-To: <3662750.o7rAqR3Ra6@nimes> References: <3662750.o7rAqR3Ra6@nimes> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77771-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Running the attached script on Solaris 11.4 or Solaris 11 OpenIndiana, > in the coreutils-9.7 build tree, produces a crash: > > $ sh ~/cmd > 42 351 ... > 4 235 ... > 42 351 ... > /home/bruno/cmd: line 4: 18141: Memory fault(coredump) > Segmentation Fault (core dumped) > > What triggers the crash is a %'g directive that produces a large > number of digits. > > The gdb stack trace shows the location: inside function > insert_thousands_sep in /lib/64/libc.so.1. It's fixed through the gnulib commits relating to vasnprintf from 2025-04-10 to 2025-04-12. ------------=_1744493042-26436-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 12 Apr 2025 21:16:23 +0000 Received: from localhost ([127.0.0.1]:32937 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u3iD9-0005we-7S for submit@debbugs.gnu.org; Sat, 12 Apr 2025 17:16:23 -0400 Received: from lists.gnu.org ([2001:470:142::17]:60120) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u3iD7-0005wN-PR for submit@debbugs.gnu.org; Sat, 12 Apr 2025 17:16:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u3iD2-00046Y-Ch for bug-coreutils@gnu.org; Sat, 12 Apr 2025 17:16:16 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([85.215.255.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u3iCz-0006xp-JA for bug-coreutils@gnu.org; Sat, 12 Apr 2025 17:16:16 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1744492570; cv=none; d=strato.com; s=strato-dkim-0002; b=QJXmQkLkBNTYaCD4cA/tBu9AmfL27eV8Cs+UeZ5GrNpdnxBDE4UWYXioKo8iyvBoFz rFuffqQQG9x9ZEGv9E7DUSRp/MGLZ8gWekCKGdEf40tElZzG1q4KdAncdtvP8fA3ylWJ MbV2yPjRg5IXc86Yv9zL0hyY6hu7HW6sDh1/Mg15Jly0br4fZ0rr1btesc961dA+3O3W 9kErKRwQkUgXRvG1RmPfyPvT9SYf+Qt9UBLfFYd9TvBoILoXNfPbBKqqZd/q4wmrkZTS whoepuU5VcZqqTZLxdVmWKWJBuSyuPFKQYbHru/6zcdkH4dMgdd5K8v2c1SxsorZtkjv cVcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1744492570; s=strato-dkim-0002; d=strato.com; h=Message-ID:Date:Subject:To:From:Cc:Date:From:Subject:Sender; bh=r+1KJcJczJnY/gL6aky7nDgesnq9ZkqfHH15WdSLmnU=; b=JxJJoNRI76OGfCOPRK6T2gfwyb8TMs4ETbOknZFZYdmuzE5HERGNnnpwPAIfeDNELd ITx0D/oL7ajw4jpk8zM7VeKrt2pVY0NgP+qdq7WbLQ0PJgRapgqohFwRgGiE2sDk0yHr pz1s7iaJHSH/7PrsyBPKNM6LraFWFVtAeH0ItnXlespxrE7FKdkLfPpxlW9b/TVSyTDS eksqdSsbPaQUGBarm13+IVEtDjiftC+f/RRCOEtUrrVWXKfjjbJX230XRivv0QABcAZZ icsLgAXeRHn3qs5IqgCZAS17jPHP9w7RFs27gD6hXbeymecjJYWDI3fIDB78hL48NG6P RcUg== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1744492570; s=strato-dkim-0002; d=clisp.org; h=Message-ID:Date:Subject:To:From:Cc:Date:From:Subject:Sender; bh=r+1KJcJczJnY/gL6aky7nDgesnq9ZkqfHH15WdSLmnU=; b=JtcPsDf+dQXpU413x14ur732viSmbmPNd3vd20NmObi0LrD2EaREIfHWjH+U6DhYZ6 f+m8Rcb1d+YnqtdqUTtKEtzj+YDCfE2Vjond+8ic2lE1BFDZpc2W0fr/2e8FNPaOd/7e ubdsO0gv1lqtECt48+NepFH9mabdwKwjAKAAHmb6DfNEdgGtmjmpr6z34I+dr+kp7Ank +K+CSrfEnCJ2MKGIRWGBszyuQ+mB14pNCJAb6x6kK6YJodgXpwL/+AGPPuGGmqURkk1s de/cDgG6qng5husgn9AqZmYvCzDUt7kYJXOA5LT+gOVu9+6IOP7lVtiESNFX2oEfFhLI 730Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1744492570; s=strato-dkim-0003; d=clisp.org; h=Message-ID:Date:Subject:To:From:Cc:Date:From:Subject:Sender; bh=r+1KJcJczJnY/gL6aky7nDgesnq9ZkqfHH15WdSLmnU=; b=tqdJHJ5vnbffbnWOqktPd1lEVkAipkN4dmSmXBMQps5PFRDhfAC62qBzs6OIRHC4/B 1FiQ6Fdv3XGPHLGMyCDA== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlLnY4jECd2hdUURIbZgL8PX2QiTuZ3cdB8X/nqj+bFWiSBYTlmlIfRYFx1bhHOv6m" Received: from nimes.localnet by smtp.strato.de (RZmta 51.3.0 AUTH) with ESMTPSA id N7dcf813CLGAlNt (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Sat, 12 Apr 2025 23:16:10 +0200 (CEST) From: Bruno Haible To: bug-coreutils@gnu.org Subject: coreutils 9.7 printf crashes on Solaris 11 Date: Sat, 12 Apr 2025 23:16:10 +0200 Message-ID: <3662750.o7rAqR3Ra6@nimes> Organization: GNU MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart5457072.Zugxlq0yvN" Content-Transfer-Encoding: 7Bit Received-SPF: none client-ip=85.215.255.20; envelope-from=bruno@clisp.org; helo=mo4-p00-ob.smtp.rzone.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This is a multi-part message in MIME format. --nextPart5457072.Zugxlq0yvN Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Running the attached script on Solaris 11.4 or Solaris 11 OpenIndiana, in the coreutils-9.7 build tree, produces a crash: $ sh ~/cmd 42 351 ... 4 235 ... 42 351 ... /home/bruno/cmd: line 4: 18141: Memory fault(coredump) Segmentation Fault (core dumped) What triggers the crash is a %'g directive that produces a large number of digits. The gdb stack trace shows the location: inside function insert_thousands_sep in /lib/64/libc.so.1. --nextPart5457072.Zugxlq0yvN Content-Disposition: attachment; filename="cmd" Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="x-UTF_8J"; name="cmd" LC_ALL=fr_FR.UTF-8 ./printf "%'.50g\\n" 42351647362715016953416125033982098102569580078125 LC_ALL=fr_FR.UTF-8 ./printf "%'.100g\\n" 4235164736271501695341612503398209810256958007812500000000000000000000000000000000000000000000000000 LC_ALL=fr_FR.UTF-8 ./printf "%'.200g\\n" 42351647362715016953416125033982098102569580078125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 LC_ALL=fr_FR.UTF-8 ./printf "%'.500g\\n" 42351647362715016953416125033982098102569580078125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 --nextPart5457072.Zugxlq0yvN-- ------------=_1744493042-26436-1--