Linker should reject invalid firstVariadicArg option

XMLWordPrintable

    • Type: Bug
    • Resolution: Not an Issue
    • Priority: P3
    • None
    • Affects Version/s: 21
    • Component/s: core-libs
    • None

      Linker.nativeLinker().downcallHandle(
              Linker.nativeLinker().defaultLookup().find("printf").get(),
              FunctionDescriptor.of(JAVA_INT, ADDRESS, JAVA_INT, JAVA_INT, JAVA_INT),
              Linker.Option.firstVariadicArg(4)
      );

      Here argument index 4 is invalid for the given function descriptor. Hence expect IllegalArgumentException to be thrown, but is not thrown.

      When tried with index 5, exception is thrown indeed.

            Assignee:
            Jorn Vernee
            Reporter:
            Prashanthram Gundarlahally
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: