From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 14697 invoked from network); 24 Sep 2021 12:37:33 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 24 Sep 2021 12:37:33 -0000 Received: (qmail 23579 invoked by uid 550); 24 Sep 2021 12:37:31 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 23558 invoked from network); 24 Sep 2021 12:37:30 -0000 Date: Fri, 24 Sep 2021 08:37:17 -0400 From: Rich Felker To: Ivo Palli Cc: "musl@lists.openwall.com" Message-ID: <20210924123717.GE13220@brightrain.aerifal.cx> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] Musl compiled gawk coredumps. How to find out where? On Fri, Sep 24, 2021 at 10:41:24AM +0000, Ivo Palli wrote: > Hi there, > > I compiled gawk-4.2.1 (with gmp-6.2.1 and mpfr-4.1.0) using musl-1.2.2. > > Using it with I script I wrote I get > > gawk: /.../.../build_total.awk:25: (FILENAME=big.report FNR=6) fatal error: internal error > ../go: line 36: 14488 Aborted (core dumped) > > Loading it into gdb doesn't give much information: > > # gdb -q ./gawk core.gawk.0.51bcaa32ed144d2498e3a70ff28af961.14488.1632479605000000 > Reading symbols from ./gawk...done. > [New LWP 14488] > Core was generated by `gawk -i functions.awk -v TEMPLATE=... > Program terminated with signal SIGABRT, Aborted. > #0 0x00000000004cf169 in __restore_sigs () > (gdb) backtrace > #0 0x00000000004cf169 in __restore_sigs () > #1 0x00000000004cf1c4 in raise () > #2 0x0000000000000000 in ?? () > (gdb) frame 0 > #0 0x00000000004cf169 in __restore_sigs () > (gdb) print > The history is empty. > (gdb) > > I compiled gawk the same with regular gcc (version 8.3.1 20190507 (Red Hat 8.3.1-4)) into a dynamic binary with the same libraries, and that did complete my script without crashing. > > Can anybody inform me how to find out exactly where the crash occurs and how I can help fix this bug? Try with musl and gawk built with debug info. If you're running with musl provided by your distro, it probably has a debug symbols package you can install. If you're building musl yourself, add --enable-debug to configure command line or -g to CFLAGS manually. Rich