Problem with --enable-c-cpplib and precompiled sources

Andris Pavenis pavenis@lanet.lv
Wed Dec 9 07:40:00 GMT 1998


Hi!

I tried to build egcs-1.1.1 release for DJGPP with configure option
--enable-c-cpplib. All things I have tested works except compiling already
precompiled source (see stack trace in attachment). This happens even with
empty file so contents doesn't mater.

>From  'gcc -c -v xxx.ii'   I'm getting SIGSEGV:

cpp_buffer *
cpp_push_buffer (pfile, buffer, length)
     cpp_reader *pfile;
     U_CHAR *buffer;
     long length;
{
  register cpp_buffer *buf = CPP_BUFFER (pfile);
			############    I'm getting buf==NULL here so SIGSEGV is
                 ############   natural
  if (buf == pfile->buffer_stack)
    {
      cpp_fatal (pfile, "%s: macro or `#include' recursion too deep",
       buf->fname);
      return NULL;
    }
  buf--;
  bzero ((char *) buf, sizeof (cpp_buffer));


Andris

-------------- next part --------------
Reading specs from c:/djgpp/lib/specs
gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release)
 c:/djgpp/lib/gcc-lib/djgpp/egcs-291.60/cc1plus.exe xxx.ii -m486 -malign-jumps=2 -malign-loops=2 -malign-functions=2 -m486 -malign-jumps=2 -malign-loops=2 -malign-functions=2 -quiet -version -o E:/ccxVL0be.s
GNU C++ version egcs-2.91.60 19981201 (egcs-1.1.1 release) (djgpp) compiled by GNU C version egcs-2.91.60 19981201 (egcs-1.1.1 release).
Exiting due to signal SIGSEGV
General Protection Fault at eip=001ca4ea
eax=00000000 ebx=ffffffbc ecx=00000011 edx=00000044 esi=00200a19 edi=ffffffbc
ebp=0033aec4 esp=0033aec0 program=C:\DJGPP\LIB\GCC-LIB\DJGPP\EGCS-291.60\CC1PLUS.EXE
cs: sel=0137  base=832e4000  limit=0033afff
ds: sel=013f  base=832e4000  limit=0033afff
es: sel=013f  base=832e4000  limit=0033afff
fs: sel=0117  base=0001e370  limit=0000ffff
gs: sel=014f  base=00000000  limit=0010ffff
ss: sel=013f  base=832e4000  limit=0033afff
App stack: [0033b000..002bb000]  Exceptn stack: [001f93dc..001f749c]

Call frame traceback EIPs:
  0x001ca4ea _memset+46
  0x001c6ffe _bzero+18
  0x0008c39f _cpp_push_buffer+59, line 1854 of cpplib.c
  0x00094e45 _cpp_start_read+101, line 5722 of cpplib.c
  0x000408ae _init_parse+50
  0x000a4146 _compile_file+278, line 2546 of toplev.c
  0x000a8996 _main+4670, line 4838 of toplev.c
  0x001c5652 ___crt1_startup+174


More information about the Gcc-bugs mailing list