Skip to content

Commit 1d6468d

Browse files
authored
Merge pull request #20082 from ChengJin01/ffi_test_correct_native_function_invocation_downcall_jdk17_22_v0.48.0
[FFI/0.48] Fix the wrong invocation on the native function in downcall
2 parents 02469a0 + c6def51 commit 1d6468d

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

runtime/tests/clinkerffi/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ omr_add_exports(clinkerffitests
354354
addBoolStruct1AndNestedBoolStruct2WithXor_returnStruct2_dupStruct
355355
addNestedBoolArrayStructsWithXor_dupStruct
356356
addBoolStruct1AndNestedBoolArrayStruct2WithXor_returnStruct1_dupStruct
357-
addBoolStruct1AndNestedBoolArrayStruct2WithXor_returnStruct1_dupStruct
357+
addBoolStruct1AndNestedBoolArrayStruct2WithXor_returnStruct2_dupStruct
358358
addNestedBoolStructArrayStructsWithXor_dupStruct
359359
addBoolStruct1AndNestedBoolStructArrayStruct2WithXor_returnStruct1_dupStruct
360360
addBoolStruct1AndNestedBoolStructArrayStruct2WithXor_returnStruct2_dupStruct

runtime/tests/clinkerffi/module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-ex
347347
<export name="addBoolStruct1AndNestedBoolStruct2WithXor_returnStruct2_dupStruct"/>
348348
<export name="addNestedBoolArrayStructsWithXor_dupStruct"/>
349349
<export name="addBoolStruct1AndNestedBoolArrayStruct2WithXor_returnStruct1_dupStruct"/>
350-
<export name="addBoolStruct1AndNestedBoolArrayStruct2WithXor_returnStruct1_dupStruct"/>
350+
<export name="addBoolStruct1AndNestedBoolArrayStruct2WithXor_returnStruct2_dupStruct"/>
351351
<export name="addNestedBoolStructArrayStructsWithXor_dupStruct"/>
352352
<export name="addBoolStruct1AndNestedBoolStructArrayStruct2WithXor_returnStruct1_dupStruct"/>
353353
<export name="addBoolStruct1AndNestedBoolStructArrayStruct2WithXor_returnStruct2_dupStruct"/>

test/functional/Java17andUp/src_170/org/openj9/test/jep389/downcall/DuplicateStructTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ public void test_addBoolStruct1AndNestedBoolArrayStruct2WithXor_returnStruct2_du
246246
SequenceLayout boolArray = MemoryLayout.sequenceLayout(2, C_CHAR);
247247
GroupLayout structLayout2 = MemoryLayout.structLayout(boolArray.withName("array_elem1"), C_CHAR.withName("elem2"));
248248
FunctionDescriptor fd = FunctionDescriptor.of(structLayout2, structLayout1, structLayout2);
249-
Addressable functionSymbol = nativeLibLookup.lookup("addBoolStruct1AndNestedBoolArrayStruct2WithXor_returnStruct1_dupStruct").get();
249+
Addressable functionSymbol = nativeLibLookup.lookup("addBoolStruct1AndNestedBoolArrayStruct2WithXor_returnStruct2_dupStruct").get();
250250

251251
try (ResourceScope scope = ResourceScope.newConfinedScope()) {
252252
SegmentAllocator allocator = SegmentAllocator.ofScope(scope);

test/functional/Java21Only/src/org/openj9/test/jep442/downcall/DuplicateStructTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public void test_addBoolStruct1AndNestedBoolArrayStruct2WithXor_returnStruct2_du
224224
SequenceLayout boolArray = MemoryLayout.sequenceLayout(2, JAVA_BOOLEAN);
225225
GroupLayout structLayout2 = MemoryLayout.structLayout(boolArray.withName("array_elem1"), JAVA_BOOLEAN.withName("elem2"));
226226
FunctionDescriptor fd = FunctionDescriptor.of(structLayout2, structLayout1, structLayout2);
227-
MemorySegment functionSymbol = nativeLibLookup.find("addBoolStruct1AndNestedBoolArrayStruct2WithXor_returnStruct1_dupStruct").get();
227+
MemorySegment functionSymbol = nativeLibLookup.find("addBoolStruct1AndNestedBoolArrayStruct2WithXor_returnStruct2_dupStruct").get();
228228
MethodHandle mh = linker.downcallHandle(functionSymbol, fd);
229229

230230
try (Arena arena = Arena.ofConfined()) {

test/functional/Java22andUp/src/org/openj9/test/jep454/downcall/DuplicateStructTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public void test_addBoolStruct1AndNestedBoolArrayStruct2WithXor_returnStruct2_du
224224
SequenceLayout boolArray = MemoryLayout.sequenceLayout(2, JAVA_BOOLEAN);
225225
GroupLayout structLayout2 = MemoryLayout.structLayout(boolArray.withName("array_elem1"), JAVA_BOOLEAN.withName("elem2"));
226226
FunctionDescriptor fd = FunctionDescriptor.of(structLayout2, structLayout1, structLayout2);
227-
MemorySegment functionSymbol = nativeLibLookup.find("addBoolStruct1AndNestedBoolArrayStruct2WithXor_returnStruct1_dupStruct").get();
227+
MemorySegment functionSymbol = nativeLibLookup.find("addBoolStruct1AndNestedBoolArrayStruct2WithXor_returnStruct2_dupStruct").get();
228228
MethodHandle mh = linker.downcallHandle(functionSymbol, fd);
229229

230230
try (Arena arena = Arena.ofConfined()) {

0 commit comments

Comments
 (0)