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 bug report
#77828: LTO build fails with grep 3.12
which was filed against the grep package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 77828 <at> debbugs.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)]
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)]
[Message part 5 (message/rfc822, inline)]
[Message part 6 (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 7 (application/pgp-signature, inline)]
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.