Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8301239

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • tbd
    • 17, 19, 20
    • 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.

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

              Created:
              Updated:
              Resolved: