Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

(0): internal error: backend signals while building Firefox

John_Boltley
Beginner
912 Views
% icpc -o jsanalyze.o -c -I./../../dist/system_wrappers_js -include /var/tmp/mozilla-central/js/src/config/gcc_hidden.h -DOSTYPE=\\"Linux3.1\\" -DOSARCH=Linux -DEXPORT_JS_API -DIMPL_MFBT -DJS_HAS_CTYPES -DDLL_PREFIX=\\"lib\\" -DDLL_SUFFIX=\\".so\\" -Ictypes/libffi/include -I. -I/var/tmp/mozilla-central/js/src -I. -I./../../dist/include -I./../../dist/include/nsprpub -I/usr/include/nspr -I/var/tmp/mozilla-central/js/src -I/var/tmp/mozilla-central/js/src/assembler -I/var/tmp/mozilla-central/js/src/yarr -fPIC -fno-rtti -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -pedantic -Wno-long-long -ffunction-sections -fdata-sections -fvisibility-inlines-hidden -pthread -pipe -DNDEBUG -DTRIMMED -O3 -fomit-frame-pointer -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 -DENABLE_JIT=1 -DMOZILLA_CLIENT -include ./js-confdefs.h -MD -MF .deps/jsanalyze.pp /var/tmp/mozilla-central/js/src/jsanalyze.cpp
icpc: command line warning #10006: ignoring unknown option '-Wsynth'
icpc: command line warning #10006: ignoring unknown option '-Wno-ctor-dtor-privacy'
icpc: command line warning #10006: ignoring unknown option '-Werror=return-type'
icpc: command line remark #10148: option '-pedantic' not supported
/var/tmp/mozilla-central/js/src/jsapi.h(4862): warning #592: variable "l" is used before its value is set
*maybeThis = MAGIC_JSVAL_TO_OBJECT_OR_NULL_IMPL(l);
^

/var/tmp/mozilla-central/js/src/vm/String.h(731): warning #68: integer conversion resulted in a change of sign
static const SmallChar INVALID_SMALL_CHAR = -1;
^

/var/tmp/mozilla-central/js/src/jscntxt.h(966): warning #858: type qualifier on return type is meaningless
static const size_t threadOffset() { return offsetof(JSContext, thread_); }
^

/var/tmp/mozilla-central/js/src/vm/Stack.h(1415): warning #858: type qualifier on return type is meaningless
static const size_t offsetOfRegs() { return offsetof(StackSegment, regs_); }
^

/var/tmp/mozilla-central/js/src/ds/InlineMap.h(107): warning #2196: routine is both "inline" and "noinline"
JS_NEVER_INLINE
^

./../../dist/include/mozilla/RangedPtr.h(127): warning #488: constant "N" is not used in declaring the parameter types of function template "mozilla::RangedPtr::RangedPtr(T *)"
template
^

(0): internal error: backend signals

compilation aborted for /var/tmp/mozilla-central/js/src/jsanalyze.cpp (code 4)

% icpc -v
icpc version 12.1.0 (gcc version 4.6.0 compatibility)

0 Kudos
10 Replies
Elroy_A_Intel
Employee
912 Views
Can you provide the .i file so that I can duplicate your issue?
0 Kudos
Elroy_A_Intel
Employee
912 Views
Use the -EP -P options to create the .i file like:

$ icpc -c ....... -EP -P test.cpp
0 Kudos
John_Boltley
Beginner
912 Views
I've attached a delta-reduced testcase:
% icpc -w -c -fPIC -O2 test.i
(0): internal error: backend signals
0 Kudos
John_Boltley
Beginner
912 Views
[cpp]typedef int uint8_t;
typedef int uint32_t;
typedef uint8_t JSUint8;
typedef uint32_t JSUint32;
extern "C" typedef int JSUintn;
typedef JSUint32 uint32;
typedef JSUint8 uint8;
typedef JSUintn uintN;
struct JSScript;
extern "C" typedef uint8 jsbytecode;
struct JSContext {
};
namespace js {
typedef enum {
     JSOP_INCLOCAL, JSOP_DECLOCAL, JSOP_LOCALINC, JSOP_LOCALDEC,
     JSOP_DEFLOCALFUN_FC = 221
}
JSOp;
uintN js_GetEnterBlockStackDefs ( JSContext *, JSScript *, jsbytecode * );
namespace analyze {
unsigned GetDefCount ( JSScript *, int )
{
     js_GetEnterBlockStackDefs ( 0, 0, 0 );
}
inline bool ExtendedDef ( jsbytecode )
{
     switch ( 0 )
     case JSOP_DEFLOCALFUN_FC:
case 0:
case 1:
case JSOP_LOCALINC:
case JSOP_LOCALDEC:
}
inline bool ExtendedUse ( jsbytecode )
{
     ExtendedDef ( 0 );
}
struct UntrapOpcode {
     jsbytecode *pc;
     bool trap;
     UntrapOpcode ( JSContext *, JSScript *, jsbytecode * ):pc (  ),
          trap (  ) {
     }
     ~UntrapOpcode (  );
};
class SSAValue {
public:
     enum Kind;
     void initPushed ( uint32, uint32 ) {
          u.pushed.index = 0;
     }
     union {
          struct {
               uint32 index;
          }
          pushed;
     }
     u;
};
class ScriptAnalysis {
     void analyzeSSA ( JSContext * );
};
void ScriptAnalysis::analyzeSSA ( JSContext * cx )
{
     SSAValue *stack;
     UntrapOpcode untrap ( 0, 0, 0 );
     unsigned ndefs = GetDefCount ( 0, 0 );
     int xuses = ExtendedUse ( 0 ) ? : 0;

     for ( int i; i < ndefs; i++ )
          stack[0].initPushed ( 0, 0 );
}
}
}[/cpp]
0 Kudos
Alexander_W_Intel
912 Views
John,
I tried to reproduce your error with the .i file and the small piece of code you provided. I couldn't reproduce the error. So it might be related to your environment. Could you please give me the following additional informations:
- Linux distribution?
- 32/64 Bit?
- Command Line you used to get the error on the small reproducer
- GCC Version (4.6?)
Thanks,
Alex
0 Kudos
John_Boltley
Beginner
912 Views
Alex,

- I'm using Gentoo Linux 64bit.
- icpc -w -c -fPIC -O2 small.i
(0): internal error: backend signals
- % gcc -v
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.2/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.6.2/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-4.6.2-RC-20111019/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.2 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.2 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.2/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.2/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point --without-ppl --without-cloog --enable-lto --enable-nls --without-included-gettext --with-system-zlib --disable-werror --enable-initfini-array --with-gold --enable-secureplt --disable-multilib --enable-libmudflap --disable-libssp --enable-libgomp --enable-cld --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.6.2/python --enable-checking=release --disable-libgcj --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --with-build-config=bootstrap-lto --with-boot-ldflags=-Wl,-O1,--hash-style=gnu,--as-needed,--gc-sections,--icf=all,--icf-iterations=3 --enable-version-specific-runtime-libs
Thread model: posix
gcc version 4.6.2 20111019 (prerelease) (GCC)

Please note that I'm mainly intersted in icc's (EDG) frontend.
Compiling firefox was just a test, to see how far it would get.
I'm running a AMD processor, so maybe I just hit one of the
build in easter-eggs?
0 Kudos
Alexander_W_Intel
912 Views

John,

you are using a very uncommoncombination of GCC and OS. Gentoo is not a supported distribution and therefore its not tested. Using a Release Candidate GCC is also not a supported option.

If you have another computer with a supported Linux distribution this would be the easiest way for you to proceed. At the moment the following Linux distributions are supported:

  • Asianux* 3.0, 4.0 (Deprecated)
  • Fedora* 15
  • Red Hat Enterprise Linux* 4 (Deprecated), 5, 6
  • SUSE LINUX Enterprise Server* 10, 11 SP1
  • Ubuntu* 10.04 LTS, 11.04
  • Debian* 6.0

I can confirm that your reproducer dont show any error on RHEL6.

If you want to continue investigation on Gentoo, you might try to use a GCC 4.5.

Thanks,
Alex


0 Kudos
Elroy_A_Intel
Employee
912 Views
I was able to reproduce the issue on SUSE Linux Enterprise Server 10.
0 Kudos
Alexander_W_Intel
912 Views
Thanks ElroyI can reproduce it as well on a SLES 10 system.
A quick workaround is to compile with lower optimization(-O1 worked for me) or omit the -fPIC option.
Alex
0 Kudos
Alexander_W_Intel
912 Views
John,
to workaround the issue, you can also use a pragma to disable optimization only for certain functions or parts of the code. This should help to reduce the performance impact.
The interesting pragmas are:
Hope this helps you. I will forward the issue to our engineering.
Thanks for reporting and your help on isolating the issue.
Alex
0 Kudos
Reply