This is the mail archive of the gdb-prs@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]

[Bug fortran/19208] New: SIGSEV while opening Fortran program compiled with ifort


https://sourceware.org/bugzilla/show_bug.cgi?id=19208

            Bug ID: 19208
           Summary: SIGSEV while opening Fortran program compiled with
                    ifort
           Product: gdb
           Version: 7.10
            Status: NEW
          Severity: normal
          Priority: P2
         Component: fortran
          Assignee: unassigned at sourceware dot org
          Reporter: hahnjo at hahnjo dot de
  Target Milestone: ---

ifort 15.0.3.187

SIGSEV on strlen(name) in set_objfile_main_name, file gdb/objfiles.c, line 198,
because name could be NULL.

My solution would be the following patch:
--- gdb/dwarf2read.c.orig       2015-11-05 09:14:36.413336000 +0100
+++ gdb/dwarf2read.c    2015-11-05 09:17:24.801587000 +0100
@@ -15899,7 +15899,8 @@
             compilers pick up the new representation, we'll support this
             practice.  */
          if (DW_UNSND (&attr) == DW_CC_program
-             && cu->language == language_fortran)
+             && cu->language == language_fortran
+             && part_die->name != NULL)
            set_objfile_main_name (objfile, part_die->name, language_fortran);
          break;
        case DW_AT_inline:

Another possibility would be of course to check for NULL in
set_objfile_main_name...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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