This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
other/4977: fix-header seg fault with recursive header files
- From: ahare at btinternet dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 30 Nov 2001 23:09:59 -0000
- Subject: other/4977: fix-header seg fault with recursive header files
- Reply-to: ahare at btinternet dot com
[Get raw message]
>Number: 4977
>Category: other
>Synopsis: fix-header seg fault with recursive header files
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Nov 30 15:16:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Andy Hare
>Release: Current CVS
>Organization:
>Environment:
Cygwin hosted cross compiling for arm-elf
>Description:
During building of a cross-compiler for the arm-elf using newlib, fix-header seg faults whilst working on dirent.h. Working through and getting fix-header to display the inlcuded files being opened shows that a recursive opening is happening. By stoping the recursive calling the problem goes away. scan_decls() function causes the problem where extern_C_braces_length gets longer than the array index it is being used as.
Disscussion on gcc-bugs mailing list under subject : Problems compiling current CVS under cygwin.
This gives more detail on the exact setup of the cross configure and build, as well as actual generated error messages.
>How-To-Repeat:
The following lines fails every time until the recursive dirent.h is removed.
/build/arm/gcc/gcc/fix-header dirent.h
/xgcc-arm/gnu/arm-elf/sys-include/dirent.h
/build/arm/gcc/gcc/include/dirent.h -D__STDC__=0 -D__cplusplus -I/build/arm/
gcc/gcc/include -I/xgcc-arm/gnu/arm-elf/sys-include
>Fix:
No fix, the work around is to remove the recursive header file. Ideally the fix-header program should fail with an error message indicating a recursive problem, not just crash.
>Release-Note:
>Audit-Trail:
>Unformatted: