From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B6742384241D; Wed, 21 Oct 2020 08:16:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B6742384241D From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/97508] [10/11 Regression] ICE: decompressed stream: Destination buffer is too small Date: Wed, 21 Oct 2020 08:16:15 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: ice-on-valid-code, lto X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: marxin at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Oct 2020 08:16:15 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97508 --- Comment #4 from Martin Li=C5=A1ka --- Then we end up with 2 copies of the compressed stream: $ cat good.txt y.o: file format elf64-x86-64 Contents of section .gnu.lto_.jmpfuncs.c09bc76fb7147437: 0000 28b52ffd 20116d00 00380500 01000000 (./. .m..8...... 0010 0001001b c002 ...... $ cat bad.txt y.o: file format elf64-x86-64 Contents of section .gnu.lto_.jmpfuncs.9e830355985c8f8c: 0000 28b52ffd 20116d00 00380500 01000000 (./. .m..8...... 0010 0001001b c00228b5 2ffd2011 6d000038 ......(./. .m..8 0020 05000100 00000001 001bc002 ............=20=20=20=20 Then we tell zstd section size and decompression fails as zstd frame header contains a smaller size.=