RFR: Fix off-by-one error when verifying object registrations [v3]

William Kemper wkemper at openjdk.org
Fri Sep 2 21:54:13 UTC 2022


> This change originally started with an effort to fix a build error caused by using the global `malloc` and `free` calls. Replacing these calls with hotspot idioms caused remembered set verification errors. The verification errors were, ultimately, due to the verification code reading past the end of an array. The `NEW_C_HEAP_ARRAY` macro tacks a bit of information onto the allocated array for the purpose of tracking native memory use (NMT). This was enough to change the behavior when the verifier read past the end of the array. This PR subsumes https://github.com/openjdk/shenandoah/pull/155 and fixes the root cause of the verification errors. This change also removes the unused `overreach_map` as this was also using global `malloc` and `free` calls.

William Kemper has updated the pull request incrementally with one additional commit since the last revision:

  Remove unnecessary allocate/free checks

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

Changes:
  - all: https://git.openjdk.org/shenandoah/pull/160/files
  - new: https://git.openjdk.org/shenandoah/pull/160/files/b8abe52e..74ef669c

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=shenandoah&pr=160&range=02
 - incr: https://webrevs.openjdk.org/?repo=shenandoah&pr=160&range=01-02

  Stats: 6 lines in 1 file changed: 0 ins; 5 del; 1 mod
  Patch: https://git.openjdk.org/shenandoah/pull/160.diff
  Fetch: git fetch https://git.openjdk.org/shenandoah pull/160/head:pull/160

PR: https://git.openjdk.org/shenandoah/pull/160


More information about the shenandoah-dev mailing list