Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Simon Marchi <simon.marchi@efficios.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: restore nullptr check in compunit_symtab::find_call_site
Date: Tue, 03 Dec 2024 10:49:28 -0700	[thread overview]
Message-ID: <87ser4mzbr.fsf@tromey.com> (raw)
In-Reply-To: <20241203155223.10203-1-simon.marchi@efficios.com> (Simon Marchi's message of "Tue, 3 Dec 2024 10:52:18 -0500")

>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:

Simon> Commit de2b4ab50de ("Convert dwarf2_cu::call_site_htab to new hash
Simon> table") removed this nullptr check for no good reason.  This causes a
Simon> crash if `m_call_site_htab` is not set, as shown in PR 32410.  My guess
Simon> is that when doing this change, I tried to make `m_call_site_htab` not a
Simon> pointer, removed this check, then realized it wasn't so obvious, and
Simon> forgot to re-add the check.

Yeah, someday maybe symtabs should be allocated the ordinary way.

On the one hand, obstacks are nice since they reduce free overhead.
But on the other hand, they mean we can't use destructors... and for
this case, I think there normally aren't "too many" symtabs, so it's
probably fine to make the change.

Simon> Change-Id: I455e00cdc0519dfb412dc7826d17a839b77aae69
Simon> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32410

This looks good to me, even obvious.
Approved-By: Tom Tromey <tom@tromey.com>

Tom

  parent reply	other threads:[~2024-12-03 17:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-03 15:52 Simon Marchi
2024-12-03 16:17 ` Tom de Vries
2024-12-03 19:19   ` Simon Marchi
2024-12-03 17:49 ` Tom Tromey [this message]
2024-12-03 19:11   ` Simon Marchi
2024-12-03 19:43     ` Tom Tromey
2024-12-03 20:05       ` Simon Marchi
2024-12-03 20:15         ` Tom Tromey

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=87ser4mzbr.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@efficios.com \
    /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