public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/37287]  New: [4.4 Regression] ICE (segfault) with new debugging patch
@ 2008-08-30 11:35 burnus at gcc dot gnu dot org
  2008-08-30 14:19 ` [Bug debug/37287] " rguenth at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-08-30 11:35 UTC (permalink / raw)
  To: gcc-bugs

Seemingly, we overlooked some issue when checking the debug patches. Compiling
octopus (tddft.org) with gfortran now gives an ICE:

$ gfortran -g tmp1.f90 tmp.f90
tmp.f90:2: internal compiler error: Segmentation fault

Valgrind shows (when compiling tmp.f90, tmp1.f90 is OK):

==8754== Invalid read of size 1
==8754==    at 0xB5B660: htab_hash_string (hashtab.c:812)
==8754==    by 0x54B12E: lookup_filename (dwarf2out.c:15573)
==8754==    by 0x557B86: add_src_coords_attributes (dwarf2out.c:12442)
==8754==    by 0x558B1A: add_name_and_src_coords_attributes (dwarf2out.c:12459)
==8754==    by 0x560FC0: gen_decl_die (dwarf2out.c:15040)
==8754==    by 0x563BD7: force_decl_die (dwarf2out.c:14940)
==8754==    by 0x56559C: dwarf2out_imported_module_or_decl (dwarf2out.c:15344)
==8754==    by 0x4A15DC: gfc_trans_use_stmts (trans-decl.c:3178)
==8754==    by 0x4A180E: gfc_generate_module_vars (trans-decl.c:3385)
==8754==    by 0x48F07C: gfc_generate_module_code (trans.c:1226)


Test files (note: There is no ICE if one puts the two files into a single
file).

---------- tmp1.f90 -------------
module c_pointer_m
  use iso_c_binding, only : c_ptr, c_associated, c_null_ptr
  implicit none
contains
  subroutine set_null(ptr)
      type(c_ptr), intent(out) :: ptr
      ptr = c_null_ptr
  end subroutine set_null
end module c_pointer_m

------------ tmp.f90 ---------------
module string_m
  use c_pointer_m
  implicit none
end module string_m


-- 
           Summary: [4.4 Regression] ICE (segfault) with new debugging patch
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37287


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

* [Bug debug/37287] [4.4 Regression] ICE (segfault) with new debugging patch
  2008-08-30 11:35 [Bug debug/37287] New: [4.4 Regression] ICE (segfault) with new debugging patch burnus at gcc dot gnu dot org
@ 2008-08-30 14:19 ` rguenth at gcc dot gnu dot org
  2008-08-30 19:35 ` jakub at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-08-30 14:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2008-08-30 14:18 -------
Confirmed.  s.file is NULL:

#2  0x0820ff95 in add_src_coords_attributes (die=0xb7c2e428, decl=0xb7cb00d0)
    at /home/richard/src/trunk/gcc/dwarf2out.c:12442
12442     add_AT_file (die, DW_AT_decl_file, lookup_filename (s.file));
(gdb) print s.file
$1 = 0x0


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-08-30 14:18:13
               date|                            |
   Target Milestone|---                         |4.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37287


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

* [Bug debug/37287] [4.4 Regression] ICE (segfault) with new debugging patch
  2008-08-30 11:35 [Bug debug/37287] New: [4.4 Regression] ICE (segfault) with new debugging patch burnus at gcc dot gnu dot org
  2008-08-30 14:19 ` [Bug debug/37287] " rguenth at gcc dot gnu dot org
@ 2008-08-30 19:35 ` jakub at gcc dot gnu dot org
  2008-08-31 11:25 ` jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-08-30 19:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jakub at gcc dot gnu dot org  2008-08-30 19:34 -------
Created an attachment (id=16172)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16172&action=view)
gcc44-pr37287.patch

Patch I'm going to bootstrap/regtest.
For DW_TAG_module with DW_AT_declaration we really shouldn't add
DW_AT_decl_file and DW_AT_decl_line attributes, we don't know in which file
they are defined (and even if we read it from *.mod, it is a different file
than the CU ever includes).


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37287


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

* [Bug debug/37287] [4.4 Regression] ICE (segfault) with new debugging patch
  2008-08-30 11:35 [Bug debug/37287] New: [4.4 Regression] ICE (segfault) with new debugging patch burnus at gcc dot gnu dot org
  2008-08-30 14:19 ` [Bug debug/37287] " rguenth at gcc dot gnu dot org
  2008-08-30 19:35 ` jakub at gcc dot gnu dot org
@ 2008-08-31 11:25 ` jakub at gcc dot gnu dot org
  2008-08-31 13:13 ` jakub at gcc dot gnu dot org
  2008-08-31 17:26 ` jakub at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-08-31 11:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jakub at gcc dot gnu dot org  2008-08-31 11:24 -------
Subject: Bug 37287

Author: jakub
Date: Sun Aug 31 11:23:04 2008
New Revision: 139826

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=139826
Log:
        PR debug/37287
        * dwarf2out.c (gen_namespace_die): For DECL_EXTERNAL modules don't
        add source coords.

        * gfortran.dg/pr37287-1.f90: New test.
        * gfortran.dg/pr37287-2.F90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/pr37287-1.f90
    trunk/gcc/testsuite/gfortran.dg/pr37287-2.F90
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/dwarf2out.c
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37287


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

* [Bug debug/37287] [4.4 Regression] ICE (segfault) with new debugging patch
  2008-08-30 11:35 [Bug debug/37287] New: [4.4 Regression] ICE (segfault) with new debugging patch burnus at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2008-08-31 11:25 ` jakub at gcc dot gnu dot org
@ 2008-08-31 13:13 ` jakub at gcc dot gnu dot org
  2008-08-31 17:26 ` jakub at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-08-31 13:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jakub at gcc dot gnu dot org  2008-08-31 13:12 -------
Fixed.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37287


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

* [Bug debug/37287] [4.4 Regression] ICE (segfault) with new debugging patch
  2008-08-30 11:35 [Bug debug/37287] New: [4.4 Regression] ICE (segfault) with new debugging patch burnus at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2008-08-31 13:13 ` jakub at gcc dot gnu dot org
@ 2008-08-31 17:26 ` jakub at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-08-31 17:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jakub at gcc dot gnu dot org  2008-08-31 17:24 -------
*** Bug 37300 has been marked as a duplicate of this bug. ***


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jv244 at cam dot ac dot uk


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37287


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

end of thread, other threads:[~2008-08-31 17:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-30 11:35 [Bug debug/37287] New: [4.4 Regression] ICE (segfault) with new debugging patch burnus at gcc dot gnu dot org
2008-08-30 14:19 ` [Bug debug/37287] " rguenth at gcc dot gnu dot org
2008-08-30 19:35 ` jakub at gcc dot gnu dot org
2008-08-31 11:25 ` jakub at gcc dot gnu dot org
2008-08-31 13:13 ` jakub at gcc dot gnu dot org
2008-08-31 17:26 ` jakub at gcc dot gnu dot org

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