JDK-8266564 : Does pd_map_memory() need MAP_JIT?
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 17
  • Priority: P4
  • Status: Resolved
  • Resolution: Not an Issue
  • OS: os_x
  • CPU: aarch64
  • Submitted: 2021-05-05
  • Updated: 2021-10-01
  • Resolved: 2021-10-01
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.
JDK 18
18Resolved
Related Reports
Relates :  
Relates :  
Description
Question that came up while working on JDK-8262952

Why "pd_map_memory()" in os_bsd.cpp doesn't use "MAP_JIT" for executable memory the way "anon_mmap()" does?
Comments
I don't see a code path that would actually use pd_map_memory() on macOS and Xcode IDE finds no call hierarchy either, so this looks like dead code. Setting a breakpoint on it doesn't trigger running "java --version" or "java -jar J2Demo.jar" either. If we did use the API with "allow_exec" set to true, then we would have definitively see a failure by now, so I'm thinking that this is not an issue.
01-10-2021