public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* buglet in binutils/debug.c
@ 2000-06-16 17:41 Aaron J. Grier
  2000-06-17 15:11 ` Nick Clifton
  2001-07-18 16:22 ` Aaron J. Grier
  0 siblings, 2 replies; 4+ messages in thread
From: Aaron J. Grier @ 2000-06-16 17:41 UTC (permalink / raw)
  To: binutils

--- binutils-2.9.5.0.37/binutils/debug.c.orig   Fri Jun 16 17:18:56 2000
+++ binutils-2.9.5.0.37/binutils/debug.c        Fri Jun 16 17:28:16 2000
@@ -2198,6 +2198,12 @@
                   debug_get_type_name (handle, type));
          return NULL;
        }
+      if (l->next == l)
+        {
+          fprintf (stderr,
+                   _("debug_get_real_type: l->next == l, I'm in a loop\n"));
+          break;
+        }
     }
 
   rl.next = list;

this is probably not an optimal solution, but I was getting into an
endless loop when running m68k-rtems-objdump --debugging --disassemble
and needed a quick fix.

-- 
  Aaron J. Grier   |   Frye Electronics, Tigard, OR   |   aaron@frye.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: buglet in binutils/debug.c
  2000-06-16 17:41 buglet in binutils/debug.c Aaron J. Grier
@ 2000-06-17 15:11 ` Nick Clifton
  2001-07-18 16:22 ` Aaron J. Grier
  1 sibling, 0 replies; 4+ messages in thread
From: Nick Clifton @ 2000-06-17 15:11 UTC (permalink / raw)
  To: aaron; +Cc: binutils

Hi Aaron,

: --- binutils-2.9.5.0.37/binutils/debug.c.orig   Fri Jun 16 17:18:56 2000
: +++ binutils-2.9.5.0.37/binutils/debug.c        Fri Jun 16 17:28:16 2000
: @@ -2198,6 +2198,12 @@
:                    debug_get_type_name (handle, type));
:           return NULL;
:         }
: +      if (l->next == l)
: +        {
: +          fprintf (stderr,
: +                   _("debug_get_real_type: l->next == l, I'm in a loop\n"));
: +          break;
: +        }
:      }
:  
:    rl.next = list;
: 
: this is probably not an optimal solution, but I was getting into an
: endless loop when running m68k-rtems-objdump --debugging --disassemble
: and needed a quick fix.

You are right, this is not really the right way to solve this
problem.  You ought to track down just why the list is getting
corrupted.  (Even with the patch above applied you will probably find
that you still run into other probekms, all due to the underlying
cause of the list corruption).

Hence I cannot accept this patch.  Sorry.

Cheers
	Nick

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: buglet in binutils/debug.c
  2000-06-16 17:41 buglet in binutils/debug.c Aaron J. Grier
  2000-06-17 15:11 ` Nick Clifton
@ 2001-07-18 16:22 ` Aaron J. Grier
  2001-07-18 17:41   ` Aaron J. Grier
  1 sibling, 1 reply; 4+ messages in thread
From: Aaron J. Grier @ 2001-07-18 16:22 UTC (permalink / raw)
  To: binutils

On Fri, Jun 16, 2000 at 05:41:49PM -0700, Aaron J. Grier wrote:
> --- binutils-2.9.5.0.37/binutils/debug.c.orig   Fri Jun 16 17:18:56 2000
> +++ binutils-2.9.5.0.37/binutils/debug.c        Fri Jun 16 17:28:16 2000
> @@ -2198,6 +2198,12 @@
>                    debug_get_type_name (handle, type));
>           return NULL;
>         }
> +      if (l->next == l)
> +        {
> +          fprintf (stderr,
> +                   _("debug_get_real_type: l->next == l, I'm in a loop\n"));
> +          break;
> +        }
>      }
>  
>    rl.next = list;
> 
> this is probably not an optimal solution, but I was getting into an
> endless loop when running m68k-rtems-objdump --debugging --disassemble
> and needed a quick fix.

I noticed this a year ago.  this problem still exists in
binutils-2.12.2, and in the current version of binutils, apparent for
m68k-rtems-elf when trying to objcopy from elf to ieee with --debugging.

any ideas where to start hunting this bug down?  it's certainly been
there long enough...

-- 
  Aaron J. Grier   |    Frye Electronics, Tigard, OR   |   aaron@frye.com
                       Of course unix clones exist...
                  How else are unix supposed to reproduce?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: buglet in binutils/debug.c
  2001-07-18 16:22 ` Aaron J. Grier
@ 2001-07-18 17:41   ` Aaron J. Grier
  0 siblings, 0 replies; 4+ messages in thread
From: Aaron J. Grier @ 2001-07-18 17:41 UTC (permalink / raw)
  To: binutils

On Wed, Jul 18, 2001 at 04:22:02PM -0700, Aaron J. Grier wrote:

> any ideas where to start hunting this bug down?  it's certainly been
> there long enough...

looks like it might be a problem with the compiler, as the problem goes
away when I turn off optimization.  my build machine:

aaron2$ uname -a
Linux aaron2.internal 2.2.16 #1 Tue Jun 20 11:04:37 PDT 2000 i586 unknown
aaron2$ gcc --version
egcs-2.91.66

time to upgrade my compiler, I guess.  :)

-- 
  Aaron J. Grier   |    Frye Electronics, Tigard, OR   |   aaron@frye.com
                       Of course unix clones exist...
                  How else are unix supposed to reproduce?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-07-18 17:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-16 17:41 buglet in binutils/debug.c Aaron J. Grier
2000-06-17 15:11 ` Nick Clifton
2001-07-18 16:22 ` Aaron J. Grier
2001-07-18 17:41   ` Aaron J. Grier

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).