RFR: JDK-8254189: Improve comments for StackOverFlow and fix in_xxx() functions [v3]

Thomas Stuefe stuefe at openjdk.java.net
Wed Oct 28 17:20:07 UTC 2020


> Hi,
> 
> may I please have reviews for this small cleanup / fix?
> 
> While reviewing JDK-8253717 it was found that comments would help with understanding the StackOverFlow class. Especially the fact that the various _base_ are actually pointing outside their respective zone, since the stack grows downward and a zone (and the stack itself) range is [end, base). If you don't look at this code daily it can be surprising.
> 
> This also fixes some small off-by-one errors in various "in_stack_xxx_zone()" methods which test whether a given address is inside a zone and gave wrong results for address=base since base points outside its zone. This had the effect that an address could be in multiple zones.
> 
> Finally it adds a small gtest which tests the StackOverFlow methods.

Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision:

  Feedback Gerard

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/795/files
  - new: https://git.openjdk.java.net/jdk/pull/795/files/cc54ef8d..89f21f1a

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=795&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=795&range=01-02

  Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/795.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/795/head:pull/795

PR: https://git.openjdk.java.net/jdk/pull/795


More information about the hotspot-runtime-dev mailing list