Hi
Using gdb I found these three NULL references. All of them did cause a
segmentation fault at some point.
Whould anyone care to check it?
Josef Ezra
Index: gdbtypes.c
===================================================================
RCS file: /emc/ucode/cvsroot_0/sgdb5/gdb/gdbtypes.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gdbtypes.c 2000/03/14 20:14:15 1.1
+++ gdbtypes.c 2000/06/01 14:23:10 1.2
@@ -1111,6 +1111,14 @@
register struct type *type;
{
struct type *orig_type = type;
+
+ if (type == NULL)
+ {
+ complain (&stub_noname_complaint) ;
+ perror_with_name("Null Type") ;
+ return type ;
+ }
+
while (TYPE_CODE (type) == TYPE_CODE_TYPEDEF)
{
if (!TYPE_TARGET_TYPE (type))
Index: serial.c
===================================================================
RCS file: /emc/ucode/cvsroot_0/sgdb5/gdb/serial.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- serial.c 2000/03/14 20:15:29 1.1
+++ serial.c 2000/06/01 14:23:11 1.2
@@ -384,6 +384,7 @@
gdb_flush (serial_logfp);
}
+ if (scb == NULL) perror_with_name("serial_write: NULL structure!") ;
return (scb->ops->write (scb, str, len));
}
Index: values.c
===================================================================
RCS file: /emc/ucode/cvsroot_0/sgdb5/gdb/values.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- values.c 2000/03/14 20:15:49 1.1
+++ values.c 2000/05/02 19:59:03 1.2
@@ -183,7 +183,7 @@
for (v = all_values; v; v = v->next)
{
- if (v->next == val)
+ if (v->next == val && val != NULL)
{
v->next = val->next;
break;