This is the mail archive of the gcc-patches@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: Give a better error for PCH with exec-shield-randomize


Geoff Keating <geoffk@desire.geoffk.org> writes:

> > host-darwin.c goes ahead and
> > calls munmap on space which it doesn't need, but it only does that in
> > the special case of actually reading a PCH file, not in the normal
> > case of no PCH file.
> 
> That's not correct; it always calls munmap (or equivalent).  If no PCH
> file is used, then as soon as that is certain the address space is
> released.  As documented for HOST_HOOKS_GT_PCH_USE_ADDRESS:
> 
> > If no PCH will be loaded, this hook may be called with @var{size}
> > zero, in which case all reserved address space should be freed.

Ah, sorry, missed that.

BTW, the host-darwin.c code doesn't work as written on i386 Linux--the
program crashes before main.  Knocking the array size down to
1024*1024 lets the PCH testsuite pass, but is presumably not large
enough to be practical.  I suppose there may be some happy medium.

Ian


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