-
Enhancement
-
Resolution: Fixed
-
P3
-
None
-
repo-panama
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.
```
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.