Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email firstname.lastname@example.org
Re: [Full-Disclosure] gcc: Internal compiler error: program cc1 got fatal signal 11
Date: Thu Jan 08 2004 - 22:04:52 CST
On Thu, 08 Jan 2004 23:12:46 +0200, Georgi Guninski <guninskiguninski.com> said:
> $ gcc --version
> $ cat gcc-crash.c
> int main(void)
> $ gcc gcc-crash.c
> gcc: Internal compiler error: program cc1 got fatal signal 11
OK. To sum up:
1) "msux" ends up creating a semi-anonymous 5-byte long array, initialized to
2) 0xcafebabe as an index will try to get either the 3405691582 or -889275713 byte
of that string (depending on whether your compiler thinks it's a signed or unsigned index.
In either case, it points WAYY into the boonies.
3) This is why it *will* segfault at runtime. If it *fails* to segfault at runtime,
you have a *very* weird system indeed (or possibly very weird compiler flags ;)
4) gcc 2.95 is bombing out because it sees that the string is a constant, the index
is a constant, and it's trying to reduce it at compile time (similar to how if
you had used "msux" it could replace that with a 'x'). It's failing to note that
the index is out-of-range of the string.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Exmh version 2.5 07/13/2001
-----END PGP SIGNATURE-----
Full-Disclosure - We believe in it.