GNU bug report logs - #77824
LTO build fails with grep 3.12

Previous Next

Package: gzip;

Reported by: Christian Hesse <list <at> eworm.de>

Date: Tue, 15 Apr 2025 12:15:02 UTC

Severity: normal

Tags: notabug

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Christian Hesse <list <at> eworm.de>
To: bug-gzip <at> gnu.org
Subject: LTO build fails with grep 3.12
Date: Tue, 15 Apr 2025 11:21:51 +0200
[Message part 1 (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 2 (application/pgp-signature, inline)]

This bug report was last modified 30 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.