This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/41635] New: inappropriate assertion that fopen succeeds
- From: "jsm28 at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Oct 2009 21:58:55 -0000
- Subject: [Bug lto/41635] New: inappropriate assertion that fopen succeeds
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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