RFR: 8247201: Print potential pointer value of readable stack memory in hs_err file

Erik Österlund erik.osterlund at oracle.com
Tue Jun 9 13:00:28 UTC 2020


Looks good.

/Erik

On 2020-06-09 13:25, Stefan Karlsson wrote:
> Hi all,
>
> Please review this patch to print potential pointer value of readable 
> stack memory in hs_err files.
>
> https://cr.openjdk.java.net/~stefank/8247201/webrev.01/
> https://bugs.openjdk.java.net/browse/JDK-8247201
>
> I often see these lines in hs_err file:
> stack at sp + 2 slots: 0x00007000042e6930 points into unknown readable 
> memory: 7c cb b3 05 01 00 00 00
>
> and have to manually transpose the bytes to see if they match an 
> important pointer value.
>
> I'd like to always print the full pointer value, if possible:
> stack at sp + 2 slots: 0x00007000042e6930 points into unknown readable 
> memory: 0x0000000105b3cb7c | 7c cb b3 05 01 00 00 00
>
> The suggested patch only prints this value if the dereferenced address 
> is aligned, otherwise it skips it.
>
> Side-note: the code that determines if the memory is readable only 
> checks 4 bytes. So if we have a pointer at the end last few bytes of a 
> page, and an inaccessible page after that, it seems like the 
> pre-existing code will crash.
>
> Thanks,
> StefanK



More information about the hotspot-dev mailing list