JDK-8280941 : os::print_memory_mappings() prints segment preceeding the inclusion range
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 19
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-01-31
  • Updated: 2022-04-01
  • Resolved: 2022-02-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 17 JDK 19
17.0.4Fixed 19 b08Fixed
Related Reports
Relates :  
Description
os::print_memory_mappings() is a helpful little routine to print existing memory mappings within a given range. On Linux, it parses proc/<pid>/maps. But it always prints a segment preceding the start address, e.g. here see the first line:

```
Range [7f92467a3000-7f92467a9000) contains: 7f924679f000-7f92467a3000 rw-p 00000000 00:00 0 
7f92467a3000-7f92467a4000 rwxp 00000000 00:00 0 
7f92467a4000-7f92467a5000 rw-p 00000000 00:00 0 
7f92467a5000-7f92467a6000 rwxp 00000000 00:00 0 
7f92467a6000-7f92467a7000 rw-p 00000000 00:00 0 
7f92467a7000-7f92467a8000 rwxp 00000000 00:00 0 
7f92467a8000-7f92467a9000 rw-p 00000000 00:00 0 
```

and it should also precede the first line with a newline
Comments
A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk17u-dev/pull/326 Date: 2022-04-01 04:42:42 +0000
01-04-2022

Fix Request 17u: I'd like to backport this to jdk17. Applies cleanly, very low risk, well tested, and helps with hs-err analysis. Thank you.
01-04-2022

Changeset: d1cc5fda Author: Thomas Stuefe <stuefe@openjdk.org> Date: 2022-02-01 17:19:26 +0000 URL: https://git.openjdk.java.net/jdk/commit/d1cc5fda8f9fe3480d661985f15c71a8a9a4a7f8
01-02-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/7289 Date: 2022-01-31 12:47:03 +0000
01-02-2022