Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8217879

hs_err should print more instructions in hex dump

XMLWordPrintable

    • b07

        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]

              shade Aleksey Shipilev
              shade Aleksey Shipilev
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: