-
Bug
-
Resolution: Fixed
-
P3
-
None
-
None
C programs can have less strict alignment constraints using pragmas directives:
#pragma pack(4)
struct packed_struct {
int x;
long long y;
long long z;
}
Currently, jextract ignores these directives, and ends up generating layouts which feature standard alignment constraint. In the above case, this would lead to issues, since "y" is not 64-bit aligned. That is, jextract needs to tweak the alignment constraint associated with the struct layout, to make sure that the layout is well formed w.r.t. alignment constraints.
Original problem reported here:
https://mail.openjdk.java.net/pipermail/panama-dev/2021-January/011820.html
#pragma pack(4)
struct packed_struct {
int x;
long long y;
long long z;
}
Currently, jextract ignores these directives, and ends up generating layouts which feature standard alignment constraint. In the above case, this would lead to issues, since "y" is not 64-bit aligned. That is, jextract needs to tweak the alignment constraint associated with the struct layout, to make sure that the layout is well formed w.r.t. alignment constraints.
Original problem reported here:
https://mail.openjdk.java.net/pipermail/panama-dev/2021-January/011820.html
- relates to
-
JDK-8261578 jextract crashes with Crossing storage unit boundaries
-
- Resolved
-