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/67567] resolve.c: gfc_error called with iface->module == NULL


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67567

Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-09-14
                 CC|                            |manu at gcc dot gnu.org
            Summary|pretty-print.h sanitizer    |resolve.c: gfc_error called
                   |detects NULL pointer passed |with iface->module == NULL
                   |to obstack_grow             |
     Ever confirmed|0                           |1

--- Comment #1 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> ---
(In reply to Vittorio Zecca from comment #0)
> but I believe it best to fix it by prefixing the statement with "if(length)"

That would hide the real bug, which is that:

          gfc_error ("%s between the MODULE PROCEDURE declaration "
                     "in module %s and the declaration at %L in "
                     "SUBMODULE %s", errmsg, iface->module,
                     &sym->declared_at, sym->ns->proc_name->name);

is called with iface->module == NULL.

(I think you are doing a nice job at finding and reporting all these sanitizer
issues, but it would be better to figure out the real causes in order to
implement the best solution, and for that you need to master GDB. Otherwise,
developers eager to close as many issues as fast as possible may end up slowing
down the compiler with unnecessary checks while hiding real bugs).

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