test/jdk/java/foreign/CallGeneratorHelper.java padding not always correct

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • tbd
    • Affects Version/s: 17, 19, 20
    • Component/s: core-libs
    • None

      The padding alignment is not always calculated correctly in the foreign test case test/jdk/java/foreign/CallGeneratorHelper.java https://github.com/openjdk/jdk/blob/a74ebd048ae569296619c112c23169c46b571863/test/jdk/java/foreign/CallGeneratorHelper.java#L157
      Using % alone is not correct. It needs to be:
           padding = alignment - (offset % alignment)
      and apply only when padding != alignment.

            Assignee:
            Per-Ake Minborg
            Reporter:
            Andrew Leonard
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: