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

Possible bug in GCC 5, need help



Hi,

The current version of Iceweasel in unstable fails to build because of
an internal error in the javascript engine which looks like it could be
caused by some miscompilation. The same Iceweasel version doesn't
exhibit the problem when compiled on stretch.

An easier way to reproduce than to build iceweasel entirely is:
- install autotools-dev and python
- create a directory
- in that directory, run:
  /path/to/iceweasel-source/js/src/configure --without-intl-api
  make
- then run:
  dist/bin/js

Normally, you'd get a "js>" prompt. On a broken build, you see:

self-hosted:16:0 InternalError: function nested too deeply:
self-hosted:16:0 }
self-hosted:16:0 ^

I was able to narrow it down as follows:
- Building js/src/Parser.o only with GCC 4.9 and all the rest with GCC
  5 fixes it.
- Building js/src/Parser.o with a #pragma GCC optimize("O0") at the
  beginning fixes it.
- Then I was able to go down at the function level, whereby moving the
  following function at the end of the file and preceding it with the
  pragma above fixes it:
    template <>
    /* static */ bool
    Parser<FullParseHandler>::bindLexical(BindData<FullParseHandler>* data,
                                          HandlePropertyName name,
                                          Parser<FullParseHandler>* parser)

  (somehow, adding a #pragma GCC optimize("O3") after a O0 one doesn't
   raise optimization level for the rest of the file, what's why I
   double checked by moving the function)

Could someone with s390x assembly knowledge look at the assembly for
that function and narrow it down further, possibly filing a GCC bug?

Thanks,

Mike


Reply to: