public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/98407] [11 Regression] ICE: Aborted (in constant_byte_string; free(): invalid pointer) since r11-6271-g69165332a914f116 Date: Mon, 21 Dec 2020 09:16:51 +0000 [thread overview] Message-ID: <bug-98407-4-IHMatuBEv8@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-98407-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98407 --- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:d8aeee11af715507e61464d390f14e4f4fde61b0 commit r11-6281-gd8aeee11af715507e61464d390f14e4f4fde61b0 Author: Jakub Jelinek <jakub@redhat.com> Date: Mon Dec 21 10:14:46 2020 +0100 fold-const: Fix up a buffer overflow in native_encode_initializer [PR98407] For flexible array members we need to incrementally clear just from ptr + total_bytes up to new ptr + total_bytes, but memset has been called with the length from ptr, so was missing - total_bytes. Additionally, in this code off is guaranteed to be -1 and thus o 0, so don't bother pretending we could handle anything else, it would be more complicated than that. 2020-12-21 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/98407 * fold-const.c (native_encode_initializer): When handling flexible array members, fix up computation of length for memset. Also remove " - o" as o is always guaranteed to be 0 in this code path. * gcc.c-torture/compile/pr98407.c: New test.
next prev parent reply other threads:[~2020-12-21 9:16 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-12-21 7:28 [Bug c/98407] New: [11 Regression] ICE: Aborted (in constant_byte_string; free(): invalid pointer) asolokha at gmx dot com 2020-12-21 8:58 ` [Bug c/98407] [11 Regression] ICE: Aborted (in constant_byte_string; free(): invalid pointer) since r11-6271-g69165332a914f116 marxin at gcc dot gnu.org 2020-12-21 9:04 ` [Bug tree-optimization/98407] " jakub at gcc dot gnu.org 2020-12-21 9:16 ` cvs-commit at gcc dot gnu.org [this message] 2020-12-21 9:18 ` jakub at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-98407-4-IHMatuBEv8@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).