* [commit] Fix flags type initialization bug
@ 2006-08-22 20:24 Mark Kettenis
2006-08-22 20:57 ` Joel Brobecker
0 siblings, 1 reply; 7+ messages in thread
From: Mark Kettenis @ 2006-08-22 20:24 UTC (permalink / raw)
To: gdb-patches
I'm working on printing proper flags for some registers on SPARC when
I hit this. It makes gdb crash, so perhaps I should put this on the
release branch too?
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* gdbtypes.c (init_flags_type): Set all fields to zero instead of
just the first one.
Index: gdbtypes.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtypes.c,v
retrieving revision 1.105
diff -u -p -r1.105 gdbtypes.c
--- gdbtypes.c 1 Mar 2006 19:34:46 -0000 1.105
+++ gdbtypes.c 22 Aug 2006 19:41:50 -0000
@@ -878,7 +878,7 @@ init_flags_type (char *name, int length)
type = init_type (TYPE_CODE_FLAGS, length, TYPE_FLAG_UNSIGNED, name, NULL);
TYPE_NFIELDS (type) = nfields;
TYPE_FIELDS (type) = TYPE_ALLOC (type, nfields * sizeof (struct field));
- memset (TYPE_FIELDS (type), 0, sizeof (struct field));
+ memset (TYPE_FIELDS (type), 0, nfields * sizeof (struct field));
return type;
}
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [commit] Fix flags type initialization bug
2006-08-22 20:24 [commit] Fix flags type initialization bug Mark Kettenis
@ 2006-08-22 20:57 ` Joel Brobecker
2006-08-22 21:31 ` Mark Kettenis
0 siblings, 1 reply; 7+ messages in thread
From: Joel Brobecker @ 2006-08-22 20:57 UTC (permalink / raw)
To: Mark Kettenis; +Cc: gdb-patches
> I'm working on printing proper flags for some registers on SPARC when
> I hit this. It makes gdb crash, so perhaps I should put this on the
> release branch too?
Is there a way to cause GDB 6.5 to crash, or is only after you
applied your changes?
Right now, I don't have any plan in making a minor release from
the 6.5 branch, but I don't mind making one if the fixes of this
kind keep piling up.
> Index: ChangeLog
> from Mark Kettenis <kettenis@gnu.org>
>
> * gdbtypes.c (init_flags_type): Set all fields to zero instead of
> just the first one.
>
> Index: gdbtypes.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/gdbtypes.c,v
> retrieving revision 1.105
> diff -u -p -r1.105 gdbtypes.c
> --- gdbtypes.c 1 Mar 2006 19:34:46 -0000 1.105
> +++ gdbtypes.c 22 Aug 2006 19:41:50 -0000
> @@ -878,7 +878,7 @@ init_flags_type (char *name, int length)
> type = init_type (TYPE_CODE_FLAGS, length, TYPE_FLAG_UNSIGNED, name, NULL);
> TYPE_NFIELDS (type) = nfields;
> TYPE_FIELDS (type) = TYPE_ALLOC (type, nfields * sizeof (struct field));
> - memset (TYPE_FIELDS (type), 0, sizeof (struct field));
> + memset (TYPE_FIELDS (type), 0, nfields * sizeof (struct field));
>
> return type;
> }
--
Joel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [commit] Fix flags type initialization bug
2006-08-22 20:57 ` Joel Brobecker
@ 2006-08-22 21:31 ` Mark Kettenis
2006-08-23 17:38 ` Joel Brobecker
0 siblings, 1 reply; 7+ messages in thread
From: Mark Kettenis @ 2006-08-22 21:31 UTC (permalink / raw)
To: brobecker; +Cc: gdb-patches
> Date: Tue, 22 Aug 2006 13:41:19 -0700
> From: Joel Brobecker <brobecker@adacore.com>
>
> > I'm working on printing proper flags for some registers on SPARC when
> > I hit this. It makes gdb crash, so perhaps I should put this on the
> > release branch too?
>
> Is there a way to cause GDB 6.5 to crash, or is only after you
> applied your changes?
This is used in i386-tdep.c since january or so, and I think there is
a risk of having it crash there, but I've never seen it happen.
> Right now, I don't have any plan in making a minor release from
> the 6.5 branch, but I don't mind making one if the fixes of this
> kind keep piling up.
This one alone isn't enough, but if there are a few others like it
that can potentially crash gdb itself, I think we should consider
having a 6.5.1 release.
Mark
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [commit] Fix flags type initialization bug
2006-08-22 21:31 ` Mark Kettenis
@ 2006-08-23 17:38 ` Joel Brobecker
2006-08-25 2:24 ` Mark Kettenis
0 siblings, 1 reply; 7+ messages in thread
From: Joel Brobecker @ 2006-08-23 17:38 UTC (permalink / raw)
To: Mark Kettenis; +Cc: gdb-patches
> > Is there a way to cause GDB 6.5 to crash, or is only after you
> > applied your changes?
>
> This is used in i386-tdep.c since january or so, and I think there is
> a risk of having it crash there, but I've never seen it happen.
If there is a risk, then let's apply the patch. Let me know if you'd
like me to do it. I have a check out of the branch already available,
so I can do it pretty efficiently.
> > Right now, I don't have any plan in making a minor release from
> > the 6.5 branch, but I don't mind making one if the fixes of this
> > kind keep piling up.
>
> This one alone isn't enough, but if there are a few others like it
> that can potentially crash gdb itself, I think we should consider
> having a 6.5.1 release.
You're no3 on the list of fixes that made it to the branch.
I try to be careful in my review of the patches that are applied,
so hopefully I didn't miss any. My idea was to make a 6.5.1 release
in october or november if I had enough patches. 3 could qualify as
enough. Maybe we'll have a couple more by then.
--
Joel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [commit] Fix flags type initialization bug
2006-08-23 17:38 ` Joel Brobecker
@ 2006-08-25 2:24 ` Mark Kettenis
2006-09-01 19:02 ` Joel Brobecker
0 siblings, 1 reply; 7+ messages in thread
From: Mark Kettenis @ 2006-08-25 2:24 UTC (permalink / raw)
To: brobecker; +Cc: gdb-patches
> Date: Tue, 22 Aug 2006 22:11:22 -0700
> From: Joel Brobecker <brobecker@adacore.com>
>
> > > Is there a way to cause GDB 6.5 to crash, or is only after you
> > > applied your changes?
> >
> > This is used in i386-tdep.c since january or so, and I think there is
> > a risk of having it crash there, but I've never seen it happen.
>
> If there is a risk, then let's apply the patch. Let me know if you'd
> like me to do it. I have a check out of the branch already available,
> so I can do it pretty efficiently.
That'd be great; I don't have such a tree and I'm a bit short of
diskspace right now.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [commit] Fix flags type initialization bug
2006-08-25 2:24 ` Mark Kettenis
@ 2006-09-01 19:02 ` Joel Brobecker
2006-09-01 21:18 ` Mark Kettenis
0 siblings, 1 reply; 7+ messages in thread
From: Joel Brobecker @ 2006-09-01 19:02 UTC (permalink / raw)
To: Mark Kettenis; +Cc: gdb-patches
Hi Mark,
> > If there is a risk, then let's apply the patch. Let me know if you'd
> > like me to do it. I have a check out of the branch already available,
> > so I can do it pretty efficiently.
>
> That'd be great; I don't have such a tree and I'm a bit short of
> diskspace right now.
Sorry for the delay, I was away traveling for a week. I just applied
your patch to the branch:
from Mark Kettenis <kettenis@gnu.org>
* gdbtypes.c (init_flags_type): Set all fields to zero instead of
just the first one.
Cheers,
--
Joel
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [commit] Fix flags type initialization bug
2006-09-01 19:02 ` Joel Brobecker
@ 2006-09-01 21:18 ` Mark Kettenis
0 siblings, 0 replies; 7+ messages in thread
From: Mark Kettenis @ 2006-09-01 21:18 UTC (permalink / raw)
To: brobecker; +Cc: gdb-patches
> Date: Fri, 1 Sep 2006 12:01:55 -0700
> From: Joel Brobecker <brobecker@adacore.com>
>
> Hi Mark,
>
> > > If there is a risk, then let's apply the patch. Let me know if you'd
> > > like me to do it. I have a check out of the branch already available,
> > > so I can do it pretty efficiently.
> >
> > That'd be great; I don't have such a tree and I'm a bit short of
> > diskspace right now.
>
> Sorry for the delay, I was away traveling for a week. I just applied
> your patch to the branch:
>
> from Mark Kettenis <kettenis@gnu.org>
>
> * gdbtypes.c (init_flags_type): Set all fields to zero instead of
> just the first one.
Thanks!
Mark
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-09-01 21:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-22 20:24 [commit] Fix flags type initialization bug Mark Kettenis
2006-08-22 20:57 ` Joel Brobecker
2006-08-22 21:31 ` Mark Kettenis
2006-08-23 17:38 ` Joel Brobecker
2006-08-25 2:24 ` Mark Kettenis
2006-09-01 19:02 ` Joel Brobecker
2006-09-01 21:18 ` Mark Kettenis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox