Subject: Re: bug#78824: [igc] segfault in temacs during build => charset-table

From: Jeff Walsh <[email-masked]>
Date: Thu, 19 Jun 2025 08:13:47 +1000

Hi Pip, Helmet,

I can confirm that this is gcc 15.1 on Fedora 42.
CFLAGS are less dramatic: just `-O2 -g`

Building with commit ac73794b43d440d34689293f4152ea38a42bb07a (which I
believe has the patches) works as expected, thankyou.

Jeff Walsh

On Thu, Jun 19, 2025 at 6:19 AM Pip Cet <[email-masked]> wrote:

> "Helmut Eller" <[email-masked]> writes:
>
> > On Wed, Jun 18 2025, Jeff Walsh wrote:
> >
> >> When building the latest of the IGC branch, commit:
> >> 887db2ff38ce82bb5f33aa128c76b578caba216d
> >>
> >> I am getting a SEGFAULT during temacs execution.
> >>
> >> running under a debugger, this occurs in root_find in igc.c
> >> `if (r->d.start == start)` (r is null in this case)
> >
> > I can reproduce this with gcc 14.2, when configured with
> >
> >   ./configure -C --without-x --with-gnutls=no --with-mps=debug
> 'CFLAGS=-O2
> >   -ggdb3 -gctf -fno-omit-frame-pointer -fno-tree-sra
> >   -I/scratch/emacs/mps-install/include' 'LDFLAGS=-L
> >   /scratch/emacs/mps-install/lib'
> >
> > I had to remove --enable-checking.
>
> Et tu, GCC?  Let's hope this rampage of declaring what's logically a
> perfectly consistent call to be UB (eventually) goes the way of C99
> trigraphs...
>
> Thanks for testing that.  I've applied your second patch and hopefully
> that fixes this bug.
>
> Jeff, could you confirm?
>
> Thanks again!
>
> Pip
>
>