This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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/49623] New: Segfault of "gfortran -L" if no argument follows the "-L"


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

           Summary: Segfault of "gfortran -L" if no argument follows the
                    "-L"
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org


While it works for the C driver:

$ gcc foo.c -L
gcc: error: missing argument to â-Lâ

the Fortran driver segfaults when there is no argument following the "-L"
argument:

$ gfortran foo.f90 -L
Segmentation fault


Valgrind shows:

==18481== Invalid read of size 1
==18481==    at 0x4A06D82: strlen (mc_replace_strmem.c:275)
==18481==    by 0x40E8BE: lang_specific_driver (gfortranspec.c:95)
==18481==    by 0x405EBF: process_command (gcc.c:3637)
==18481==    by 0x40B455: main (gcc.c:6263)
==18481==  Address 0x0 is not stack'd, malloc'd or (recently) free'd


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