This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PCH failures / ICE: Segmentation fault



On Nov 5, 2003, at 1:43 PM, Per Bothner wrote:


Laurent GUERBY wrote:

I changed my build & test script to avoid running make install
before running make -k check, it fixed all the pch failures.

I am seeing lots of PCH failures while running make check, and this is without running make install - and just C.


This is on Fedora Core 0.95. (I.e. the new community-based version of Red Hat Linux.)

I took at look at the problem using gdb. The behavior is not consistent. One "run" will finish cleanly, while the next "run" will crash. It looks like different runs will allocate memory or addresses in different locations. I don't know what could cause this.

The FC release notes (http://fedora.redhat.com/docs/release-notes/) methods that FC supports "Position Independent Executables", but implies it is not the default.

I'm told there's some kind of trickiness in later versions of Red Hat Linux which causes libraries to be loaded at random (yes, really random, as in from /dev/urandom) memory locations, to make it harder to exploit certain security flaws; if so, sometimes they will collide with the addresses that PCH expects. I expect what would need to be done in that case would be something like what config/rs6000/host-darwin.c does, allocating fixed space in the non-position-independent executable; or, perhaps the OS has some region where it won't ever map libraries, in which case that could be used.


... however, this should print a nice 'sorry' message, rather than crashing. So maybe the problem is something completely different.

--
Geoff Keating <geoffk@apple.com>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]