public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* PCH support on Solaris
@ 2003-04-02 18:33 Eric Botcazou
  2003-04-03  6:05 ` Geoff Keating
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Botcazou @ 2003-04-02 18:33 UTC (permalink / raw)
  To: Geoff Keating; +Cc: gcc

Hi Geoff,

PCH support doesn't currently work on Solaris because the mmap heuristics 
used in gt_pch_save and gt_pch_restore fails:

poog% gcc/xgcc -Bgcc common-1.h
mmi.preferred_base = ff220000
mmi.size = 56000
page_size = 2000
poog% rm common-1.h
poog% gcc/xgcc -Bgcc common-1.c
mmi.preferred_base = ff220000
mmi.size = 56000
mmi.offset = 6000
addr = ff226000
xgcc: Internal error: Segmentation Fault (program cc1)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

In other words, Solaris appears to map the whole file, whatever offset you 
specify in the call to mmap, so that the address returned is

	addr = mmi.preferred_base + mmi.offset


The reporter of PR other/9830 proposes to force the address by passing 
MAP_FIXED to mmap; this works (all pch tests of the testsuite pass) but, if 
my interpretation is correct, this could fail if the pages before the forced 
address are for some reason unmappable.

The other solution is of course to pre-calculate mmi.offset and add it to 
mmi.preferred_base, but there is an obvious chicken-and-egg problem with the 
current code in ggc-common.c.

Hence two questions: which solution is the right one? If it is the second 
solution, is there any mean to easily pre-calculate mmi.offset or do we need 
to resort to re-playing the first part of the write operation?

Thanks in advance.

-- 
Eric Botcazou

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-04-03  7:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-02 18:33 PCH support on Solaris Eric Botcazou
2003-04-03  6:05 ` Geoff Keating
2003-04-03  7:23   ` Eric Botcazou
2003-04-03  8:04     ` Geoff Keating
2003-04-03  9:18       ` Eric Botcazou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).