GNU bug report logs -
#77828
LTO build fails with grep 3.12
Previous Next
Reported by: Christian Hesse <list <at> eworm.de>
Date: Tue, 15 Apr 2025 17:03:03 UTC
Severity: normal
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sat, 19 Apr 2025 23:41:17 -0700
with message-id <cbe6ce22-db08-4b49-8294-b43439e118b4 <at> cs.ucla.edu>
and subject line Re: bug#77828: LTO build fails with grep 3.12
has caused the debbugs.gnu.org bug report #77828,
regarding LTO build fails with grep 3.12
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
77828: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=77828
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
Hello everybody,
I am building grep 3.12 in a clean build environment for Arch Linux. That
fails when building with link time optimization is enabled:
CCLD grep
In function 'dfaoptimize',
inlined from 'dfaanalyze' at ../lib/dfa.c:2873:3:
../lib/dfa.c:2606:12: error: writing 1 byte into a region of size 0
[-Werror=stringop-overflow=] 2606 | flags[0] |= OPT_QUEUED;
| ^
In function 'icalloc',
inlined from 'xicalloc' at ../lib/xmalloc.c:304:10,
inlined from 'xizalloc' at ../lib/xmalloc.c:289:10,
inlined from 'dfaoptimize' at ../lib/dfa.c:2589:17,
inlined from 'dfaanalyze' at ../lib/dfa.c:2873:3:
../lib/ialloc.h:91:10: note: destination object of size [0,
9223372036854775807] allocated by 'calloc' 91 | return calloc (n, s);
| ^
lto1: all warnings being treated as errors
The build succeed as soon as I disable link time optimization. Would be nice
to have a fix for this to reenable lto. Let me know if I can provide more
information on this. Thanks!
--
main(a){char*c=/* Schoene Gruesse */"B?IJj;MEH"
"CX:;",b;for(a/* Best regards my address: */=0;b=c[a++];)
putchar(b-1/(/* Chris cc -ox -xc - && ./x */b/42*2-3)*42);}
[Message part 4 (application/pgp-signature, inline)]
[Message part 5 (message/rfc822, inline)]
[Message part 6 (text/plain, inline)]
On 2025-04-15 10:01, Christian Hesse wrote:
> The build succeed as soon as I disable link time optimization. Would be nice
> to have a fix for this to reenable lto.
Thanks for reporting that. It's a false alarm from GCC. I worked around
the problem by installing the attached patch into Gnulib to pacify GCC,
and I'm closing the grep bug report.
[0001-dfa-pacify-gcc-Wstringop-overflow.patch (text/x-patch, attachment)]
This bug report was last modified 128 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.