[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: glib 1.1.12, gtk1.1.12 for debian/ppc

On Fri, 15 Jan 1999, Daniel Jacobowitz wrote:
> And here we reach the really "fun" part.  I would really appreciate if
> you could attempt to produce a test case.  I think there is some
> information about doing this in the egcs-docs; what it boils down to is
> first isolating where in the source exactly the problem is occuring,
> and then removing as much as possible (don't change the compiler flags,
> though - -fPIC especially may be involved, with -O2) from the source
> without removing the bug.  It's not an easy thing to do at all but it
> makes fixing the egcs bug MUCH easier.

This is indeed funny, because I got myself down to just that... bug
tracking. Well, I may say I have been lucky, because I managed to pinpoint
the offending function. Actually there was no bug in testglib.c itself,
rather to a system function, one which I have heard a lot of, and has
pissed me quite a lot personally when working on some Convex systems...


Actually testglib #defined g_alloca as alloca and used that instead, still
the problem is alloca itself, not the definition. The code that is causing
all the trouble is the only occurence of alloca in testglib.c, which
follows -the excerpt not the file!

line 913:
  g_print ("checking alloca()-based allocation routines...");

  string = g_alloca(80);          <-------- offending line!
  g_assert(string != NULL);
  for (i = 0; i < 80; i++)
    string[i] = 'x';
  string[79] = 0;
  g_assert(strlen(string) == 79);

the compiler command is 

gcc -DHAVE_CONFIG_H -I. -I. -I. -DG_LOG_DOMAIN=g_log_domain_glib  -O3 \
-Wall -c testglib.c

and it produces the output

testglib.c: In function `main':
testglib.c:302: warning: unused variable `gti'
testglib.c:291: warning: `tmp_string' might be used uninitialized in this
testglib.c:966: internal error--unrecognizable insn:
(insn 11027 11024 11023 (set (reg:DI 18 r18)
        (mem:DI (plus:SI (reg:SI 18 r18)
                (const_int 65536)))) -1 (insn_list 8761 (insn_list 8784
(insn_list 8800 (insn_list 8807 (insn_list 8823 (insn_list 8835 (insn_list
8830 (insn_list 8843 (insn_list 8855 (insn_list 8850 (insn_list 8870
(insn_list 11024 (insn_list:REG_DEP_OUTPUT 11016 (insn_list:REG_DEP_ANTI
11019 (insn_list:REG_DEP_ANTI 11022 (nil))))))))))))))))
../../gcc/toplev.c:1378: Internal compiler error in function fatal_insn

which keeps appearing still if I replace -O3 with -O2, but disappears with

Alright, that's a rap. Any ideas? 

Konstantinos Margaritis

Reply to: