MemoryLayout API checks should be more eager

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P3
    • None
    • Affects Version/s: repo-panama
    • Component/s: core-libs

      The MemoryLayout API allows ill-formed layout to be constructed w/o errors. For instance:

      ```
      structLayout(JAVA_INT, JAVA_LONG)
      ```

      This struct layout is missing a 32-bit padding between the two elements. But no exception is produced. Instead, an exception is given when a var handle pointing to the second field is constructed.

      This is undesirable, as it can lead to latent bugs.

            Assignee:
            Maurizio Cimadamore
            Reporter:
            Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: