This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

recursive bug in dwarf2read.c


Hi,

I think there is a bug in dwarf2read.c which can be exposed by
attempting to set a break point at RealIO_WriteFixed in this
executable.

I acknowledge the (gnu modula-2 generated executable) could probably
be at fault, nevertheless it does contain cyclic data structures which
are not explicitly created in the same way as C.  For example:


TYPE
  ScanState =  PROCEDURE (CHAR, VAR ScanClass, VAR ScanState);



is allowed and I suspect that this (or one just like it) is causing
the problem below.  The following is a 64 bit executable built on
Debian Lenny.


$ wget http://floppsie.comp.glam.ac.uk/download/m2/bug/write-fixed
$ gdb write-fixed

(gdb) break  RealIO_WriteFixed
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f7fd313f6e0 (LWP 24641)]
0x00000000005a8f48 in is_ref_attr (attr=Cannot access memory at
address 0x7fff4d028ff8
) at dwarf2read.c:10206

  ...

#105 0x000000000059fbd3 in read_tag_pointer_type (die=0x24fe140,
cu=0x24e40a0) at dwarf2read.c:5700
(top-gdb) 
#106 0x00000000005a65a1 in read_type_die (die=0x24fe140, cu=0x24e40a0)
at dwarf2read.c:8824
(top-gdb) 
#107 0x00000000005a6488 in tag_type_to_type (die=0x24fe140,
cu=0x24e40a0) at dwarf2read.c:8782
(top-gdb) 
#108 0x00000000005a6373 in die_type (die=0x24fe0f0, cu=0x24e40a0) at
dwarf2read.c:8741
(top-gdb) 
#109 0x000000000059fdbe in read_tag_reference_type (die=0x24fe0f0,
cu=0x24e40a0) at dwarf2read.c:5774
(top-gdb) 
#110 0x00000000005a65cd in read_type_die (die=0x24fe0f0, cu=0x24e40a0)
at dwarf2read.c:8830
(top-gdb) 
#111 0x00000000005a6488 in tag_type_to_type (die=0x24fe0f0,
cu=0x24e40a0) at dwarf2read.c:8782
(top-gdb) 
#112 0x00000000005a6373 in die_type (die=0x24fe060, cu=0x24e40a0) at
dwarf2read.c:8741
(top-gdb) 
#113 0x00000000005a03ae in read_subroutine_type (die=0x24fdfa0,
cu=0x24e40a0) at dwarf2read.c:5922
(top-gdb) 
#114 0x00000000005a655f in read_type_die (die=0x24fdfa0, cu=0x24e40a0)
at dwarf2read.c:8815
(top-gdb) 
#115 0x00000000005a6488 in tag_type_to_type (die=0x24fdfa0,
cu=0x24e40a0) at dwarf2read.c:8782
(top-gdb) 
#116 0x00000000005a6373 in die_type (die=0x24fe140, cu=0x24e40a0) at
dwarf2read.c:8741
(top-gdb) 
#117 0x000000000059fbd3 in read_tag_pointer_type (die=0x24fe140,
cu=0x24e40a0) at dwarf2read.c:5700


regards,
Gaius


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]