Bug 8365 - anon mmap configure test fails
Summary: anon mmap configure test fails
Status: RESOLVED DUPLICATE of bug 3163
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 3.2
: P3 normal
Target Milestone: ---
Assignee: Zack Weinberg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-26 01:16 UTC by dave
Modified: 2005-02-09 02:18 UTC (History)
2 users (show)

See Also:
Host: sparc-sun-solaris2.8/9
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2003-06-01 18:57:34


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dave 2002-10-26 01:16:01 UTC
The mmap configure test in gcc subdirectory has this comment for test_3:

Getting two adjacent 1-page regions with two mmap calls is slightly
tricky.  All OS's tested skip over already-allocated blocks; therefore
we have been careful to unmap all allocated regions in previous tests.
HP/UX allocates pages backward in memory.  No OS has yet been observed
to be so perverse as to leave unmapped space between consecutive calls
to mmap.

Solaris 8 & 9 leave unmapped space (which isn't perverse, BTW),
so the test fails. Running the test yields something like:

test 3 nonconsecutive pages - ff380000, ff360000

Release:
gcc-3.2

Environment:
Solaris 8 & 9 on SPARC, possibly others

How-To-Repeat:
Just run the test.
Comment 1 dave 2002-10-26 01:16:01 UTC
Fix:
I've added the second argument to anonmap() and if that
argument isn't zero, it's passed as the first argument to
mmap(), along with MAP_FIXED flag. I've modified test_3()
to use it for the second mapping. With that in place, the
whole mmap test succeeds.
Comment 2 Eric Botcazou 2003-03-28 10:10:14 UTC
State-Changed-From-To: open->analyzed
State-Changed-Why: Confirmed on Sparc/Solaris 9.
Comment 3 dank 2003-06-01 00:37:55 UTC
This sounds kinda like
http://archive.linuxfromscratch.org/mail-archives/lfs-dev/2003/03/0193.html
which was mentioned in
http://linuxfromscratch.org/~greg/pure_lfs.txt
(see footnote 2).  I emailed the lfs guys to ask them to comment...
Comment 4 dank 2003-06-01 03:04:45 UTC
Aha.  They said "see bug 10284".
Comment 5 Zack Weinberg 2003-06-01 03:40:04 UTC
I propose to fix this as well as bug 10284 by blacklisting the two host
systems (Windows and VMS) that don't have the exact mmap behavior we want, thus
eliminating the need for this very fragile test.
Comment 6 Eric Botcazou 2003-06-01 06:43:57 UTC
I'm all for it: the more we can get rid of dumb assumptions like the one in this
check, the more portable the compiler will be.
Comment 7 Neil Booth 2003-06-01 13:31:04 UTC
Subject: Re:  [sparc-sun-solaris2.8/9] anon mmap configure test fails

zack@gcc.gnu.org wrote:-

> PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8365
> 
> 
> zack@gcc.gnu.org changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>              Status|NEW                         |ASSIGNED
>    Last reconfirmed|0000-00-00 00:00:00         |2003-06-01 03:40:04
>                date|                            |
> 
> 
> ------- Additional Comments From zack@gcc.gnu.org  2003-06-01 03:40 -------
> I propose to fix this as well as bug 10284 by blacklisting the two host
> systems (Windows and VMS) that don't have the exact mmap behavior we want, thus
> eliminating the need for this very fragile test.

Now that CPP doesn't mmap its input, is this configure step even needed?

Neil.
Comment 8 Zack Weinberg 2003-06-01 17:14:21 UTC
Subject: Re:  [sparc-sun-solaris2.8/9] anon mmap configure
 test fails


That's a different check (HAVE_MMAP_FILE) and it's still used in
several places - PCH, libintl, fixincludes.

But I'm planning to get rid of the big hairy AC_TRY_RUN test for that,
too.
Comment 9 Zack Weinberg 2003-06-02 03:07:52 UTC

*** This bug has been marked as a duplicate of 3163 ***