[foreign-abi] [Rev 01] RFR: 8240173: Confusing overflow error when trying to dereference a nothing segment

Maurizio Cimadamore mcimadamore at openjdk.java.net
Thu Feb 27 18:07:18 UTC 2020


> This simple patch attempts to generate a more explicit error message when trying to dereference an address which is based on the Nothing segment. Note that the first problem here is caused by the fact that the Nothing segment is considered "small" - which means most of the real address values will fall outside its range. While we could simply fix that (which will improve the error message - from reporting an overflow during offset computation to report an access outside the bounds of the segment), I thought it was better to mark the Nothing segment as non-accessible, and generate an explicit error message.

The pull request has been updated with 1 additional commit.

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

Added commits:
 - 08023b8c: * Tweak exception message

Changes:
  - all: https://git.openjdk.java.net/panama-foreign/pull/34/files
  - new: https://git.openjdk.java.net/panama-foreign/pull/34/files/d3ea2ea0..08023b8c

Webrevs:
 - full: https://webrevs.openjdk.java.net/panama-foreign/34/webrev.01
 - incr: https://webrevs.openjdk.java.net/panama-foreign/34/webrev.00-01

  Stats: 4 lines in 4 files changed: 0 ins; 0 del; 4 mod
  Patch: https://git.openjdk.java.net/panama-foreign/pull/34.diff
  Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/34/head:pull/34

PR: https://git.openjdk.java.net/panama-foreign/pull/34


More information about the panama-dev mailing list