-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P3
-
None
-
Affects Version/s: None
-
Component/s: tools
Consider this case:
#pragma pack(push, 1)
struct A {
long long a;
int b;
};
#pragma pack(pop)
struct B {
struct A x[1];
};
In this case, jextract doesn't work as expected. The size of the struct A is 12 bytes, which is NOT a multiple of the struct alignment (8). As a result, when we try to create a sequence layout with A as element layout, we get an exception.
#pragma pack(push, 1)
struct A {
long long a;
int b;
};
#pragma pack(pop)
struct B {
struct A x[1];
};
In this case, jextract doesn't work as expected. The size of the struct A is 12 bytes, which is NOT a multiple of the struct alignment (8). As a result, when we try to create a sequence layout with A as element layout, we get an exception.