From: Paul Pluzhnikov <ppluzhnikov@google.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches ml <gdb-patches@sourceware.org>
Subject: Re: [patch] Fix for PR gdb/10819
Date: Thu, 22 Oct 2009 06:14:00 -0000 [thread overview]
Message-ID: <8ac60eac0910212314h3517ff9btcad84f8d0978bddb@mail.gmail.com> (raw)
In-Reply-To: <20091022054758.GA15116@host0.dyn.jankratochvil.net>
[-- Attachment #1: Type: text/plain, Size: 512 bytes --]
On Wed, Oct 21, 2009 at 10:47 PM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> I would find appropriate there a comment it is a Solaris bug workaround, the
> condition looks to me as clearly redundant there now.
Comment added.
Should this patch (if approved) also go into gdb-7.0 branch?
(It is clearly very safe.)
Thanks,
--
Paul Pluzhnikov
2009-10-22 Paul Pluzhnikov <ppluzhnikov@google.com>
PR gdb/10819
* dwarf2-frame.c (find_cie): Don't call bsearch on
empty cie_table.
[-- Attachment #2: gdb-pr10819-20091022.txt --]
[-- Type: text/plain, Size: 620 bytes --]
--- dwarf2-frame.c.orig 2009-10-21 21:34:20.000000000 -0700
+++ dwarf2-frame.c 2009-10-21 23:10:29.000000000 -0700
@@ -1525,6 +1525,14 @@ find_cie (struct dwarf2_cie_table *cie_t
{
struct dwarf2_cie **p_cie;
+ if (cie_table->num_entries == 0)
+ {
+ /* On Solaris 8 bsearch may call comparison function even when given
+ an empty table. As a work around, don't call bsearch under these
+ conditions. */
+ return NULL;
+ }
+
p_cie = bsearch (&cie_pointer, cie_table->entries, cie_table->num_entries,
sizeof (cie_table->entries[0]), bsearch_cie_cmp);
if (p_cie != NULL)
next prev parent reply other threads:[~2009-10-22 6:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-22 4:48 Paul Pluzhnikov
2009-10-22 5:48 ` Jan Kratochvil
2009-10-22 6:14 ` Paul Pluzhnikov [this message]
2009-10-22 10:43 ` Pedro Alves
2009-10-22 11:09 ` Andreas Schwab
2009-10-22 15:34 ` Paul Pluzhnikov
2009-10-22 16:30 ` Paul Pluzhnikov
2009-10-22 17:44 ` Tom Tromey
2009-10-22 18:31 ` Paul Pluzhnikov
2009-10-22 20:13 ` Tom Tromey
2009-10-22 20:46 ` Paul Pluzhnikov
2009-10-22 18:11 ` Pedro Alves
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=8ac60eac0910212314h3517ff9btcad84f8d0978bddb@mail.gmail.com \
--to=ppluzhnikov@google.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.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