This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: OpenBSD pch, take 2
- From: Marc Espie <espie at nerim dot net>
- To: Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>
- Cc: GCC Development <gcc at gcc dot gnu dot org>
- Date: Mon, 31 Jan 2005 16:10:42 +0100
- Subject: Re: OpenBSD pch, take 2
- References: <20050131121547.GA24600@tetto.home> <41FE451C.1080605@lu.unisi.ch>
- Reply-to: espie at nerim dot net
On Mon, Jan 31, 2005 at 03:47:56PM +0100, Paolo Bonzini wrote:
> >The very nasty thing is that they will *appear* to work. Namely, loading
> >a pch file will work 95% of the time... and fail whenever the file cannot
> >be mmaped at the same address due to randomization issues.
> >So, mark them as completely unreliable.
>
> You may want to find the largest VMA and make the PCH reside in the 200
> MB in the middle of it, or allocate the topmost free 200 MB in the
> address space, etc.
>
> Linux has similar problems, see host-linux.c. If you bring the
> percentage up to 99% or so, it can be ok because PCH should only cause a
> compilation slowdown rather than incorrect results.
>
> Paolo
Nope.
It doesn't work. Specifying pch on the command line will fail if the pch
loading doesn't work, it won't revert gracefully to normal headers.
And it's not a question of finding an address that works, no address works.
And 99% is not acceptable. How would you feel if you had this nifty
compilation procedure that works only 99% of the time and fails the
remaining 1% ? This means that every automated build is doomed. Thus
pch are totally unfit for production on OpenBSD.