Jextract doesn't enforce group layout alignment correctly in some cases

XMLWordPrintable

    • 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.

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

              Created:
              Updated:
              Resolved: