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 lto/41635] New: inappropriate assertion that fopen succeeds


As noted in my review of the LTO front end,

      resolution = fopen (resolution_file_name, "r");
      gcc_assert (resolution != NULL);

is not an appropriate use of an assertion because the fopen could
fail through system resource exhaustion even if you know the file
exists and is readable and has proper contents.  A normal error or
fatal error needs to be given instead.


-- 
           Summary: inappropriate assertion that fopen succeeds
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jsm28 at gcc dot gnu dot org


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


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