public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/109752] [ICE] in check_complete_insertion, at hash-table.h:578
Date: Sat, 06 May 2023 22:08:19 +0000	[thread overview]
Message-ID: <bug-109752-4-Tc1s3PdMDV@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-109752-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109752

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aoliva at gcc dot gnu.org

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Bisection using the original preprocessed code shows it started to ICE with
r13-4937 although maybe that just added an assertion to catch a latent bug.

check hash table insertions

I've noticed a number of potential problems in hash tables, of three
kinds: insertion of entries that seem empty, dangling insertions, and
lookups during insertions.

These problems may all have the effect of replacing a deleted entry
with one that seems empty, which may disconnect double-hashing chains
involving that entry, and thus cause entries to go missing.

This patch detects such problems by recording a pending insertion and
checking that it's completed before other potentially-conflicting
operations.  The additional field is only introduced when checking is
enabled.

for  gcc/ChnageLog

* hash-table.h (check_complete_insertion, check_insert_slot):
New hash_table methods.
(m_inserting_slot): New hash_table field.
(begin, hash_table ctors, ~hash_table): Check previous insert.
(expand, empty_slow, clear_slot, find_with_hash): Likewise.
(remote_elt_with_hash, traverse_noresize): Likewise.
(gt_pch_nx): Likewise.
(find_slot_with_hash): Likewise.  Record requested insert.

  parent reply	other threads:[~2023-05-06 22:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-05 17:50 [Bug c++/109752] New: " ldalessandro at gmail dot com
2023-05-05 17:52 ` [Bug c++/109752] " pinskia at gcc dot gnu.org
2023-05-05 17:52 ` pinskia at gcc dot gnu.org
2023-05-05 18:00 ` ldalessandro at gmail dot com
2023-05-05 18:08 ` ldalessandro at gmail dot com
2023-05-05 19:35 ` pinskia at gcc dot gnu.org
2023-05-06 22:08 ` redi at gcc dot gnu.org [this message]
2023-05-06 22:10 ` redi at gcc dot gnu.org
2023-05-08 14:40 ` [Bug c++/109752] [13/14 regression] ICE in check_complete_insertion, at hash-table.h:578 since r13-4937 ppalka at gcc dot gnu.org
2023-05-09 19:08 ` cvs-commit at gcc dot gnu.org
2023-05-09 19:10 ` [Bug c++/109752] [13 " ppalka at gcc dot gnu.org
2023-05-12 12:38 ` cvs-commit at gcc dot gnu.org
2023-05-12 12:47 ` ppalka 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-109752-4-Tc1s3PdMDV@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: link
Be 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).