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

preprocessor/556: cpplib uses freed file descriptors



>Number:         556
>Category:       preprocessor
>Synopsis:       cpplib uses freed file descriptors
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 19 21:46:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Krister Walfridsson
>Release:        2.96 (ss-20000918)
>Organization:
>Environment:
i386-unknown-netbsd1.5 (a.out)
>Description:
cpplib from ss-20000918 tries to use a filedescriptor fd == -1 when compiling the following small program:

--- /dev/null   Wed Sep 20 04:59:26 2000
+++ foo.c       Wed Sep 20 06:39:57 2000
@@ -0,0 +1,3 @@
+#include "foo.h"
+#undef FOO
+#include "foo.h"

--- /dev/null   Wed Sep 20 04:59:26 2000
+++ foo.h       Wed Sep 20 06:40:00 2000
@@ -0,0 +1,3 @@
+#ifndef        FOO
+#define        FOO
+#endif

Compilation gives the error:
> gcc foo.c
foo.c:3:17: foo.h: Bad file descriptor
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:

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