Commit Graph

195 Commits

Author SHA1 Message Date
Per Minborg
4f4d00fa75 8319966: AIX: expected [[0:i4]] but found [[0:I4]] after JDK-8319882
Reviewed-by: mdoerr
2023-11-15 13:52:06 +00:00
Jorn Vernee
9c98270737 8254693: Add Panama feature to pass heap segments to native code
Reviewed-by: mcimadamore, lucy, vlivanov
2023-11-14 11:19:30 +00:00
Per Minborg
c9657cad12 8319882: SequenceLayout::toString throws ArithmeticException
Reviewed-by: mcimadamore
2023-11-10 14:24:22 +00:00
Maurizio Cimadamore
f262f06c97 8319211: Regression in LoopOverNonConstantFP
Reviewed-by: jvernee
2023-11-01 17:49:21 +00:00
Leo Korinth
d52a995f35 8315097: Rename createJavaProcessBuilder
Reviewed-by: lmesnik, dholmes, rriggs, stefank
2023-10-27 08:47:26 +00:00
Jorn Vernee
3885dc5b9a 8318737: Fallback linker passes bad JNI handle
Reviewed-by: alanb
2023-10-26 15:54:02 +00:00
Maurizio Cimadamore
848ecc1621 8318538: Add a way to obtain a strided var handle from a layout
Reviewed-by: jvernee, pminborg
2023-10-20 10:35:09 +00:00
Maurizio Cimadamore
b07da3ae15 8317819: Scope should reflect lifetime of underying resource (mainline)
Reviewed-by: jvernee
2023-10-20 10:23:45 +00:00
Per Minborg
defc7e0f8d 8318454: TestLayoutPaths broken on Big Endian platforms after JDK-8317837
Reviewed-by: mdoerr, mcimadamore
2023-10-19 10:47:53 +00:00
Jorn Vernee
1d54e73f6a 8318072: DowncallLinker does not acquire/release segments in interpreter
Reviewed-by: mcimadamore
2023-10-14 20:23:41 +00:00
Maurizio Cimadamore
7cb2e6d65b 8317514: Ensure MemorySegment is initialized before touching NativeMemorySegmentImpl
Co-authored-by: Jorn Vernee <jvernee@openjdk.org>
Reviewed-by: jvernee
2023-10-13 20:51:52 +00:00
Jorn Vernee
b12c471a99 8317837: Leftover FFM implementation-only changes
Co-authored-by: Maurizio Cimadamore <mcimadamore@openjdk.org>
Co-authored-by: Per Minborg <pminborg@openjdk.org>
Reviewed-by: mcimadamore
2023-10-13 19:05:47 +00:00
Jorn Vernee
32ac72c3d3 8312522: Implementation of Foreign Function & Memory API
Co-authored-by: Maurizio Cimadamore <mcimadamore@openjdk.org>
Co-authored-by: Jorn Vernee <jvernee@openjdk.org>
Co-authored-by: Per Minborg <pminborg@openjdk.org>
Reviewed-by: dholmes, psandoz, mcimadamore, alanb
2023-10-12 19:50:08 +00:00
Maurizio Cimadamore
798125152b 8316970: Add internal annotation to mark restricted methods
Reviewed-by: jvernee, iris, alanb
2023-09-28 09:49:57 +00:00
Per Minborg
8dc2d9280e 8316190: Improve MemorySegment::toString
Reviewed-by: rriggs
2023-09-15 05:43:57 +00:00
Erik Joelsson
020255a72d 8267174: Many test files have the wrong Copyright header
Reviewed-by: valeriep, aivanov, iris, dholmes, ihse
2023-09-12 20:16:05 +00:00
Per Minborg
b408a82f9b 8314260: Unable to load system libraries on Windows when using a SecurityManager
Co-authored-by: Jorn Vernee <jvernee@openjdk.org>
Reviewed-by: jvernee
2023-09-07 11:52:14 +00:00
Sidraya
ec1f7a8480 8311630: [s390] Implementation of Foreign Function & Memory API (Preview)
Reviewed-by: amitkumar, jvernee, mdoerr
2023-08-21 07:15:25 +00:00
Per Minborg
2b81885f78 8314071: Test java/foreign/TestByteBuffer.java timed out
Reviewed-by: mcimadamore
2023-08-17 11:31:09 +00:00
Leonid Mesnik
7b28d3608a 8314330: java/foreign tests should respect vm flags when start new processes
Reviewed-by: jvernee
2023-08-16 17:49:38 +00:00
Yasumasa Suenaga
583cb754f3 8313406: nep_invoker_blob can be simplified more
Reviewed-by: jvernee, vlivanov
2023-08-14 23:12:42 +00:00
Per Minborg
bbbfa217a0 8313880: Incorrect copyright header in jdk/java/foreign/TestFree.java after JDK-8310643
Reviewed-by: thartmann
2023-08-07 12:34:52 +00:00
Per Minborg
0b4387e3a3 8310643: Misformatted copyright messages in FFM
Reviewed-by: jvernee
2023-08-07 10:58:11 +00:00
Jorn Vernee
6fca289887 8313023: Return value corrupted when using CCS + isTrivial (mainline)
Reviewed-by: mcimadamore, vlivanov
2023-07-31 08:01:17 +00:00
Per Minborg
d1cc278260 8311822: AIX : test/jdk/java/foreign/TestLayouts.java fails because of different output - expected [[i4](struct)] but found [[I4](struct)]
Reviewed-by: jvernee
2023-07-24 15:00:47 +00:00
Jorn Vernee
69a46c25cc 8310157: Allow void-returning filters for MethodHandles::collectCoordinates
Reviewed-by: mcimadamore
2023-07-17 14:53:37 +00:00
Jorn Vernee
e022e87654 8310053: VarHandle and slice handle derived from layout are lacking alignment check
Reviewed-by: mcimadamore
2023-06-21 00:03:13 +00:00
Axel Boldt-Christmas
a0595761ef 8310187: Improve Generational ZGC jtreg testing
Reviewed-by: stefank, eosterlund, stuefe
2023-06-20 10:08:13 +00:00
Jorn Vernee
4c18b9e1fa 8309880: Add support for linking libffi on Windows and Mac
Co-authored-by: Aleksey Shipilev <shade@openjdk.org>
Co-authored-by: Jorn Vernee <jvernee@openjdk.org>
Reviewed-by: erikj
2023-06-14 12:03:42 +00:00
Maurizio Cimadamore
a6ad42e00e 8308645: Javadoc of FFM API needs to be refreshed
8309398: ValueLayout:: arrayElementVarHandle doesn't throws UnsupportedOperationException - if byteAlignment() > byteSize()
8308812: SequenceLayout::withElementCount(long elementCount) doesn't throw IllegalArgumentException - if elementCount < 0 for some cases

Reviewed-by: jvernee
2023-06-12 15:55:49 +00:00
Jorn Vernee
c49129f545 8308445: Linker should check that capture state segment is big enough
Reviewed-by: mcimadamore
2023-06-07 12:25:28 +00:00
Jorn Vernee
fa791119f0 8308031: Linkers should reject unpromoted variadic parameters
Reviewed-by: mcimadamore
2023-06-07 12:14:55 +00:00
Maurizio Cimadamore
2b186e246e 8309042: MemorySegment::reinterpret cleanup action is not called for all overloads
Reviewed-by: jvernee
2023-05-30 10:24:10 +00:00
Maurizio Cimadamore
534de6d8ae 8300491: SymbolLookup::libraryLookup accepts strings with terminators
Reviewed-by: psandoz
2023-05-25 15:22:27 +00:00
Martin Doerr
7764f46e9e 8308761: New test TestHFA needs adaptation for JDK-8308276
Reviewed-by: mcimadamore, mbaesken
2023-05-24 13:45:57 +00:00
Martin Doerr
20f15352a3 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview)
Reviewed-by: jvernee, rrich
2023-05-24 08:38:34 +00:00
Maurizio Cimadamore
5fc9b5787d 8308276: Change layout API to work with bytes, not bits
Reviewed-by: psandoz, pminborg
2023-05-22 14:57:00 +00:00
Maurizio Cimadamore
91aeb5de58 8287834: Add SymbolLookup::or method
Reviewed-by: psandoz
2023-05-22 14:51:09 +00:00
Maurizio Cimadamore
44218b1c9e 8308248: Revisit alignment of layout constants on 32-bit platforms
Reviewed-by: psandoz, pminborg
2023-05-19 14:28:14 +00:00
Maurizio Cimadamore
13a3fce29e 8307961: java/foreign/enablenativeaccess/TestEnableNativeAccess.java fails with ShouldNotReachHere
Reviewed-by: jvernee
2023-05-12 10:38:27 +00:00
Maurizio Cimadamore
ba9714d44c 8307610: Linker::nativeLinker should not be restricted (mainline)
Reviewed-by: jvernee
2023-05-11 09:45:45 +00:00
Maurizio Cimadamore
f92d095e16 8307411: Test java/foreign/channels/TestAsyncSocketChannels.java failed: IllegalStateException: Already closed
Reviewed-by: jvernee
2023-05-09 11:11:15 +00:00
Maurizio Cimadamore
7a3bea1f6a 8307629: FunctionDescriptor::toMethodType should allow sequence layouts (mainline)
Reviewed-by: jvernee
2023-05-09 11:09:39 +00:00
Maurizio Cimadamore
47422be2d1 8307375: Alignment check on layouts used as sequence element is not correct
Reviewed-by: jvernee
2023-05-05 15:59:13 +00:00
Jorn Vernee
a8bf2acb7d 8304888: Add dedicated VMProps for linker and fallback linker
Reviewed-by: alanb, mcimadamore
2023-05-02 13:56:32 +00:00
Jorn Vernee
1532a1b0bd 8307164: TestSegmentCopy times out (mainline)
Reviewed-by: mcimadamore
2023-05-02 10:42:49 +00:00
Jorn Vernee
7d07d19523 8305201: Improve error message for GroupLayouts that are too large on SysV
Reviewed-by: mcimadamore
2023-05-01 14:12:51 +00:00
Jorn Vernee
67dd841432 8305093: Linker cache should not take layout names into account
Reviewed-by: mcimadamore
2023-05-01 13:41:00 +00:00
Jorn Vernee
1de1a38859 8303002: Reject packed structs from linker
8300784: Specify exactly how padding should be presented to the linker
8304803: NPE thrown during downcall classification under Linux/x64
8303524: Check FunctionDescriptor byte order when linking

Reviewed-by: mcimadamore
2023-05-01 13:00:41 +00:00
Per Minborg
cbccc4c817 8304265: Implementation of Foreign Function and Memory API (Third Preview)
Co-authored-by: Maurizio Cimadamore <mcimadamore@openjdk.org>
Co-authored-by: Jorn Vernee <jvernee@openjdk.org>
Co-authored-by: Paul Sandoz <psandoz@openjdk.org>
Co-authored-by: Feilong Jiang <fjiang@openjdk.org>
Co-authored-by: Per Minborg <pminborg@openjdk.org>
Reviewed-by: erikj, jvernee, vlivanov, psandoz
2023-04-27 09:00:58 +00:00
Roger Riggs
6c3b10fb1d 8303485: Replacing os.name for operating system customization
Reviewed-by: naoto, erikj, alanb
2023-03-27 17:45:20 +00:00
Jorn Vernee
2b81faeb35 8303022: "assert(allocates2(pc)) failed: not in CodeBuffer memory" When linking downcall handle
Reviewed-by: kvn, vlivanov
2023-03-15 23:43:18 +00:00
Jorn Vernee
6d30bbe62c 8303001: Add test for re-entrant upcalls
Reviewed-by: mcimadamore
2023-03-10 14:42:54 +00:00
Jorn Vernee
5977f266d0 8303604: Passing by-value structs whose size is not power of 2 doesn't work on all platforms (mainline)
Reviewed-by: mcimadamore
2023-03-06 15:18:39 +00:00
Jorn Vernee
dccfe8a2ee 8303582: Reduce duplication in jdk/java/foreign tests
Reviewed-by: mcimadamore
2023-03-06 14:52:04 +00:00
Jorn Vernee
c6de66c03f 8303516: HFAs with nested structs/unions/arrays not handled correctly on AArch64
Reviewed-by: mcimadamore
2023-03-03 14:33:56 +00:00
Saint Wesonga
fb13063943 8303409: Add Windows AArch64 ABI support to the Foreign Function & Memory API
Reviewed-by: jvernee
2023-03-02 13:26:27 +00:00
Feilong Jiang
24cdcd4c70 8293841: RISC-V: Implementation of Foreign Function & Memory API (Preview)
Co-authored-by: Weikai He <weikai@isrc.iscas.ac.cn>
Co-authored-by: Fei Yang <fyang@openjdk.org>
Reviewed-by: jvernee, fyang, shade, yadongwang
2023-01-19 01:33:35 +00:00
Maurizio Cimadamore
b9275a8ed1 8300275: SegmentScope.isAccessibleBy returning incorrect values
Reviewed-by: alanb, jvernee
2023-01-18 12:36:15 +00:00
Maurizio Cimadamore
945ef07564 8299862: OfAddress setter should disallow heap segments
Reviewed-by: jvernee
2023-01-11 10:31:25 +00:00
Maurizio Cimadamore
9c4ed16be2 8299561: VaList.empty() doesn't return a list associated with the global scope
Reviewed-by: jvernee
2023-01-05 09:44:16 +00:00
Maurizio Cimadamore
f771c56e16 8298797: Specification of some restricted methods is incorrect
Reviewed-by: jvernee, pminborg
2022-12-16 10:49:22 +00:00
Jorn Vernee
0452c39fec 8296477: Foreign linker implementation update following JEP 434
Co-authored-by: Jorn Vernee <jvernee@openjdk.org>
Co-authored-by: Nick Gasson <ngasson@openjdk.org>
Co-authored-by: Per Minborg <pminborg@openjdk.org>
Reviewed-by: rehn, mcimadamore, vlivanov
2022-12-05 14:47:12 +00:00
Maurizio Cimadamore
73baadceb6 8295044: Implementation of Foreign Function and Memory API (Second Preview)
Co-authored-by: Jorn Vernee <jvernee@openjdk.org>
Co-authored-by: Per Minborg <pminborg@openjdk.org>
Co-authored-by: Maurizio Cimadamore <mcimadamore@openjdk.org>
Reviewed-by: jvernee, pminborg, psandoz, alanb, sundar
2022-12-05 13:49:53 +00:00
Jorn Vernee
1722f9cce3 8290231: java/foreign/malloc/TestMixedMallocFree.java crashed in JDK19 ATR run
Reviewed-by: mcimadamore
2022-11-30 20:00:59 +00:00
Jorn Vernee
1a2ff58761 8297736: test/jdk/java/foreign/TestMatrix.java is broken
8291642: java/foreign/TestMatrix.java -few tests are failing due to JDK-8287158.

Reviewed-by: mcimadamore
2022-11-30 19:59:43 +00:00
Jorn Vernee
54a2c5a6d1 8290059: Do not use std::thread in panama tests
Reviewed-by: mcimadamore, stuefe, erikj
2022-07-28 14:53:26 +00:00
David Holmes
923462467e Merge 2022-07-27 14:07:11 +00:00
Maurizio Cimadamore
36c00fdd74 8291006: java/foreign/TestUnsupportedPlatform fails after JDK-8290455
Reviewed-by: jvernee
2022-07-27 09:50:58 +00:00
Maurizio Cimadamore
8c9d5ad4f8 8290455: jck test api/java_lang/foreign/VaList/Empty.html fails on some platforms
Reviewed-by: jvernee, mbaesken
2022-07-25 21:32:44 +00:00
Christoph Langer
c29242ebb0 8290460: Alpine: disable some panama tests that rely on std::thread
Backport-of: d7f0de272c
2022-07-22 11:33:05 +00:00
Thomas Stuefe
d7f0de272c 8290460: Alpine: disable some panama tests that rely on std::thread
Reviewed-by: jvernee, dholmes
2022-07-19 07:13:18 +00:00
Jesper Wilhelmsson
a7f83582d3 Merge 2022-07-14 06:19:40 +00:00
Jesper Wilhelmsson
d9ca438d06 Merge 2022-07-12 16:16:16 +00:00
Maurizio Cimadamore
4545ed6842 8289365: SegmentAllocator:allocateArray(MemoryLayout, count) does not throw IAEx when count is -1
Reviewed-by: psandoz
2022-07-12 14:22:42 +00:00
Maurizio Cimadamore
2baf526fce 8288850: SegmentAllocator:allocate() can return null some cases
Reviewed-by: psandoz
2022-07-12 14:14:46 +00:00
Jorn Vernee
3164c98f4c 8289148: j.l.foreign.VaList::nextVarg call could throw IndexOutOfBoundsException or even crash the VM
8289333: Specification of method j.l.foreign.VaList::skip deserves clarification
8289156: j.l.foreign.VaList::skip call could throw java.lang.IndexOutOfBoundsException: Out of bound access on segment

Reviewed-by: mcimadamore
2022-07-12 11:25:45 +00:00
Maurizio Cimadamore
fed3af8ae0 8287809: Revisit implementation of memory session
Reviewed-by: jvernee
2022-07-11 14:30:19 +00:00
Coleen Phillimore
e7795851d2 8271707: migrate tests to use jdk.test.whitebox.WhiteBox
Reviewed-by: lmesnik, dholmes
2022-07-08 15:55:14 +00:00
Maurizio Cimadamore
8e01ffb3a7 8289570: SegmentAllocator:allocateUtf8String(String str) default behavior mismatch to spec
Reviewed-by: alanb, psandoz
2022-07-01 21:46:07 +00:00
Maurizio Cimadamore
adbd200dc5 8289228: SegmentAllocator::allocateArray null handling is too lax
Reviewed-by: jvernee, psandoz
2022-06-28 10:06:42 +00:00
Maurizio Cimadamore
2c8ada689f 8289188: SegmentAllocator:allocateArray(*) default behavior mismatch to spec
Reviewed-by: alanb
2022-06-27 15:37:08 +00:00
Maurizio Cimadamore
d7b43af591 8288761: SegmentAllocator:allocate(long bytesSize) not throwing IAEx when bytesSize < 0
Reviewed-by: psandoz
2022-06-21 20:59:45 +00:00
Maurizio Cimadamore
ff3db52044 8288534: Out of bound errors for memory segment access mentions wrong values
Reviewed-by: psandoz
2022-06-16 15:59:22 +00:00
Maurizio Cimadamore
f58c9a659b 8287244: Add bound check in indexed memory access var handle
Reviewed-by: psandoz, jvernee
2022-05-26 08:34:49 +00:00
Maurizio Cimadamore
e1f140d270 8287206: Use WrongThreadException for confinement errors
Reviewed-by: alanb, darcy, mchung
2022-05-25 09:50:55 +00:00
Jorn Vernee
8f0eb5d401 8287158: Explicitly reject unsupported call shapes on macos-aarch64 in mainline
Reviewed-by: mcimadamore, ngasson
2022-05-24 15:03:53 +00:00
Maurizio Cimadamore
89a1d055d9 8286715: Generalize MemorySegment::ofBuffer
Reviewed-by: jvernee
2022-05-23 08:43:51 +00:00
Jorn Vernee
ee45a0ac63 8286669: Replace MethodHandle specialization with ASM in mainline
Co-authored-by: Jorn Vernee <jvernee@openjdk.org>
Co-authored-by: Maurizio Cimadamore <mcimadamore@openjdk.org>
Reviewed-by: mcimadamore
2022-05-18 16:03:18 +00:00
Jorn Vernee
81e4bdbe13 8283689: Update the foreign linker VM implementation
Co-authored-by: Jorn Vernee <jvernee@openjdk.org>
Co-authored-by: Nick Gasson <ngasson@openjdk.org>
Reviewed-by: mcimadamore, vlivanov, rehn
2022-05-18 09:49:55 +00:00
Maurizio Cimadamore
2c5d136260 8282191: Implementation of Foreign Function & Memory API (Preview)
Reviewed-by: erikj, jvernee, psandoz, dholmes, mchung
2022-05-12 16:17:45 +00:00
Vladimir Ivanov
f86f38a8af 8280901: MethodHandle::linkToNative stub is missing w/ -Xint
Reviewed-by: shade, kvn
2022-02-23 20:29:23 +00:00
Maurizio Cimadamore
d65c665839 8279527: Dereferencing segments backed by different scopes leads to pollution
Reviewed-by: psandoz, jvernee
2022-01-07 13:41:29 +00:00
Maurizio Cimadamore
9d43d25da8 8278897: Alignment of heap segments is not enforced correctly
Reviewed-by: jvernee
2022-01-05 10:47:34 +00:00
Maurizio Cimadamore
ea905bd3da 8277924: Small tweaks to foreign function and memory API
Reviewed-by: jvernee, psandoz
2021-12-02 11:22:31 +00:00
Jorn Vernee
98a9f03739 8277602: Deopt code does not extend the stack enough if the caller is an optimize entry blob
Reviewed-by: dlong, thartmann
2021-11-30 14:34:00 +00:00
Maurizio Cimadamore
96e36071b6 8275063: Implementation of Foreign Function & Memory API (Second incubator)
Reviewed-by: erikj, psandoz, jvernee, darcy
2021-11-24 11:51:16 +00:00
Aleksey Shipilev
dc33bd8b6c 8273315: Parallelize and increase timeouts for java/foreign/TestMatrix.java test
Reviewed-by: mcimadamore
2021-09-09 07:43:22 +00:00
Jorn Vernee
845c31dc4b 8269240: java/foreign/stackwalk/TestAsyncStackWalk.java test failed with concurrent GC
Reviewed-by: vlivanov, dholmes
2021-07-20 13:10:42 +00:00
Maurizio Cimadamore
b2416b60fb 8269281: java/foreign/Test{Down,Up}call.java time out
Reviewed-by: jvernee
2021-07-13 10:53:49 +00:00