This is the mail archive of the gcc-bugs@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]

c/8365: anon mmap test fails on Solaris


>Number:         8365
>Category:       c
>Synopsis:       anon mmap test fails on Solaris
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Oct 26 01:16:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Drazen Kacar
>Release:        gcc-3.2
>Organization:
>Environment:
Solaris 8 & 9 on SPARC, possibly others
>Description:
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
>How-To-Repeat:
Just run the test.
>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.
>Release-Note:
>Audit-Trail:
>Unformatted:


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