RFR: 8292758: put support for UNSIGNED5 format into its own header file [v2]

John R Rose jrose at openjdk.org
Sat Sep 3 03:38:35 UTC 2022


On Fri, 2 Sep 2022 23:28:38 GMT, Dean Long <dlong at openjdk.org> wrote:

> I suggest splitting this up into the straight-forward refactor (without the excluded bytes change), then adding excluded bytes as a follow-up.

Yes, that is a slight change.  Splitting is not necessary for the reason you mention because this PR includes SA changes.  This SA change is tested by several jtreg tests:  That is, injecting bugs causes SA tests to fail, and fixing them fixes the tests.  This is the case because the compressed stream data structure is used for all stack walking.  So if there's a bug, we find it immediately.  And the same is true for SA unit tests which peform stack walking.  Net result:  It's safe, there is no bug, because testing coverage is robust.

The math of the encoding is the same whether there are 255 or 256 byte values available, so the adjustment is very low risk.  (The math works for any underlying byte type or size; we choose 8-bit bytes excluding nulls to provide 255 distinct tokens.)  The benefit is that the encoding can be accompanied by null termination, which enhances debuggability and resilience against bad counts and bad pointers.

-------------

PR: https://git.openjdk.org/jdk/pull/10067


More information about the serviceability-dev mailing list