JDK-8192919 : Refactor os_posix.cpp to remove non-portable flags
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 10
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2017-12-01
  • Updated: 2019-02-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Duplicate :  
Relates :  
Description
JDK-8190308 introduced a function using MAP_NORESERVE flag on mmap(). But this is not specified in POSIX[1]. So move this flag out of os_posix.cpp.

In addition, move MAP_ANONYMOUS as well since this is also not specified.

Currently AIX is the only OS reporting this problem.

[1]: http://pubs.opengroup.org/onlinepubs/009695399/functions/mmap.html
Comments
Re-opening to remove non-portable flags in os_posix.cpp.
04-12-2017

I would like to see this re-opened to clean up the use of non-POSIX code in os_posix.cpp. If we are going to have non-POSIX things in this file then they should be guarded by appropriate ifdef so that each OS that supports it can opt in to using it - rather than making it the default and requiring changes like were put in place for AIX. Someone needs to establish that the use of these flags is correct/appropriate for each OS. Even if flags have the same name, they may not have the same behaviour!
03-12-2017

MAP_NORESERVE is already fixed by JDK-8192898. The remainder of MAP_ANONYMOUS is not portable but it is not breaking any OS. Closing as a duplicate of JDK-8192898 and if MAP_ANONYMOUS makes any problem in the future, we can fix it later.
01-12-2017