-
Enhancement
-
Resolution: Fixed
-
P4
-
11, 12, 13
-
b07
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8228926 | 12u-cpu | Aleksey Shipilev | P4 | Resolved | Fixed | master |
JDK-8222994 | 12.0.2 | Aleksey Shipilev | P4 | Resolved | Fixed | b03 |
JDK-8222873 | 11.0.4 | Aleksey Shipilev | P4 | Resolved | Fixed | b01 |
Currently the "Instructions" block in hs_err prints "only" 64 bytes window around PC:
Instructions: (pc=0x00002b577170e763)
0x00002b577170e743: e5 48 83 ec 20 8b 77 30 48 8d 7d e0 64 48 8b 04
0x00002b577170e753: 25 28 00 00 00 48 89 45 f8 31 c0 e8 fd f4 3a ff
0x00002b577170e763: c7 04 25 00 00 00 00 00 00 00 00 0f 0b 55 48 89
0x00002b577170e773: e5 41 57 41 56 41 55 41 54 4c 8d a5 00 fe ff ff
That is too small of the window to debug, especially when large instructions are encoded. Larger window would make debugging easier.
Larger window may risk touching the unreadable memory, in which case hs_err machinery would print something like:
Instructions: (pc=0x0000000000000000)
0x0000000000000000:
[error occurred during error reporting (printing registers, top of stack, instructions near pc), id 0xb, SIGSEGV (0xb) at pc=0x00007f9e0a6e59a5]
Instructions: (pc=0x00002b577170e763)
0x00002b577170e743: e5 48 83 ec 20 8b 77 30 48 8d 7d e0 64 48 8b 04
0x00002b577170e753: 25 28 00 00 00 48 89 45 f8 31 c0 e8 fd f4 3a ff
0x00002b577170e763: c7 04 25 00 00 00 00 00 00 00 00 0f 0b 55 48 89
0x00002b577170e773: e5 41 57 41 56 41 55 41 54 4c 8d a5 00 fe ff ff
That is too small of the window to debug, especially when large instructions are encoded. Larger window would make debugging easier.
Larger window may risk touching the unreadable memory, in which case hs_err machinery would print something like:
Instructions: (pc=0x0000000000000000)
0x0000000000000000:
[error occurred during error reporting (printing registers, top of stack, instructions near pc), id 0xb, SIGSEGV (0xb) at pc=0x00007f9e0a6e59a5]
- backported by
-
JDK-8222873 hs_err should print more instructions in hex dump
- Resolved
-
JDK-8222994 hs_err should print more instructions in hex dump
- Resolved
-
JDK-8228926 hs_err should print more instructions in hex dump
- Resolved
- relates to
-
JDK-8217994 os::print_hex_dump should be more resilient against unreadable memory
- Resolved
-
JDK-8293851 hs_err should print more stack in hex dump
- Resolved