Compare commits

..

169 Commits

Author SHA1 Message Date
SirYwell
24dcaf9e2f JBR-7442 move AllowEnhancedClassRedefinition capabilities override to use sites 2024-07-27 01:26:32 +03:00
Nikita Gubarkov
4693fc6c88 🤠 2024-07-27 01:26:32 +03:00
Nikita Gubarkov
fa81fa9d46 JBR-7419 Refactor Vulkan code
- Separate instance and device-specific function tables
- Avoid using device from global context when possible
- Set up debug logger
2024-07-27 01:26:32 +03:00
Vitaly Provodin
a4266343aa update exclude list on results of 21.0.2_b545 (21.0.4) test runs 2024-07-27 01:26:32 +03:00
Vitaly Provodin
7a0e19a39f JBR-5989 Wayland: add tests introduced in 21.0.4 and failing with the message "WLRobotPeer: wakefield extension not present in Wayland instance" 2024-07-27 01:26:32 +03:00
Matthias Baesken
51320ec486 8333542: Breakpoint in parallel code does not work
Reviewed-by: lucy
Backport-of: b3bf31a0a0
2024-07-27 01:26:32 +03:00
Christoph Langer
e052446e30 8335960: [21u] Remove designator DEFAULT_PROMOTED_VERSION_PRE=ea for release 21.0.4
Reviewed-by: mbaesken
2024-07-27 01:26:32 +03:00
Martin Balao
3983656145 8320548: Improved loop handling
Backport-of: 72eed2f709caa48c82f58fe75c7e94d2c45947e1
2024-07-27 01:26:31 +03:00
Martin Balao
7f16f902d9 8327413: Enhance compilation efficiency
Backport-of: eb1f33f525846e6020185cbc5d6e48cbc760dbb2
2024-07-27 01:26:31 +03:00
Yuri Nesterenko
5d44aca863 8324559: Improve 2D image handling
Reviewed-by: mbalao
Backport-of: 1a5a44019871c411148ca85d0491cc68d2256e4e
2024-07-27 01:26:31 +03:00
Aleksei Voitylov
00b1398e29 8323390: Enhance mask blit functionality
Reviewed-by: mbalao
Backport-of: 895893f2fbf1c521d4a263d505f0ecbda8d2eeea
2024-07-27 01:26:31 +03:00
Martin Balao
6fefc21c96 8323231: Improve array management
Reviewed-by: mbaesken
Backport-of: cf20364d0cb3f182880ee91c7fb023615e27becf
2024-07-27 01:26:31 +03:00
Yuri Nesterenko
0fe5a4f07a 8320097: Improve Image transformations
Reviewed-by: mbalao
Backport-of: 1401634b21b76db90291011bcae68c461742e687
2024-07-27 01:26:31 +03:00
Aleksei Voitylov
db2e389074 8325600: Better symbol storage
Reviewed-by: mbalao
Backport-of: da06689bf6fde7b6dd8efc2f0c39fc95adcdb69d
2024-07-27 01:26:31 +03:00
Aleksei Voitylov
ffa7297888 8319859: Better symbol storage
Reviewed-by: yan, mbalao
Backport-of: f7857e9106841f402ade56bad0338fc53159fb9a
2024-07-27 01:26:31 +03:00
Alexei Voitylov
893dd99082 8314794: Improve UTF8 String supports
Reviewed-by: mbalao, evergizova
Backport-of: ab2532d858de8d855529b6f2491f94c499f94009
2024-07-27 01:26:31 +03:00
SendaoYan
8dad18759f 8334441: Mark tests in jdk_security_infra group as manual
Reviewed-by: mdoerr
Backport-of: 8e1d2b091c
2024-07-27 01:26:31 +03:00
Martin Doerr
4a7d3e8e7a 8320692: Null icon returned for .exe without custom icon
Backport-of: 6212264cc6
2024-07-27 01:26:31 +03:00
Ashutosh Mehra
70d4a202b2 8330275: Crash in XMark::follow_array
Reviewed-by: stuefe
Backport-of: 42b1d858d1
2024-07-27 01:26:31 +03:00
Matthias Baesken
43d475d699 8329862: libjli GetApplicationHome cleanups and enhance jli tracing
Backport-of: 377f2e538a
2024-07-27 01:26:31 +03:00
Andrew Lu
69a5bf6b0e 8323635: Test gc/g1/TestHumongousAllocConcurrentStart.java fails with -XX:TieredStopAtLevel=3
Backport-of: 5045839cb2
2024-07-27 01:26:31 +03:00
Vladimir Petko
7e4cde82b3 8295111: dpkg appears to have problems resolving symbolically linked native libraries
Backport-of: 32946e1882
2024-07-27 01:26:30 +03:00
Matthias Baesken
da927ff609 8331031: unify os::dont_yield and os::naked_yield across Posix platforms
Backport-of: c9442014e5
2024-07-27 01:26:30 +03:00
Ben Taylor
e66e3b98c4 8329223: Parallel: Parallel GC resizes heap even if -Xms = -Xmx
Backport-of: aca1e8365b
2024-07-27 01:26:30 +03:00
Matthias Baesken
291d40c18e 8330464: hserr generic events - add entry for the before_exit calls
Backport-of: 45ed97f15b
2024-07-27 01:26:30 +03:00
Matthias Baesken
cb8be250f9 8329605: hs errfile generic events - move memory protections and nmethod flushes to separate sections
Backport-of: 397d948310
2024-07-27 01:26:30 +03:00
Martin Doerr
2550aab5c6 8321812: Update GC tests to use execute[Limited]TestJava
Reviewed-by: mbaesken
Backport-of: 1d1cd32bc3
2024-07-27 01:26:30 +03:00
Andrew Lu
5ea2d617e3 8312194: test/hotspot/jtreg/applications/ctw/modules/jdk_crypto_ec.java cannot handle empty modules
Backport-of: e7c83ea948
2024-07-27 01:26:30 +03:00
Andrew Lu
4190726372 8320681: [macos] Test tools/jpackage/macosx/MacAppStoreJlinkOptionsTest.java timed out on macOS
Backport-of: a657aa38a5
2024-07-27 01:26:30 +03:00
Liang Mao
e056eac48a 8329109: Threads::print_on() tries to print CPU time for terminated GC threads
Backport-of: c1cfb43d8d
2024-07-27 01:26:30 +03:00
Liang Mao
80818c80c7 8329840: Fix ZPhysicalMemorySegment::_end type
Backport-of: b4ddddeff1
2024-07-27 01:26:30 +03:00
Andrew Lu
7847f2a151 8319338: tools/jpackage/share/RuntimeImageTest.java fails with -XX:+UseZGC
Backport-of: e9eb8b98f4
2024-07-27 01:26:30 +03:00
Sergey Bylokhov
fd1b566a71 8332253: Linux arm32 build fails after 8292591
Backport-of: 95f79c6787
2024-07-27 01:26:30 +03:00
SendaoYan
888a549442 8331466: Problemlist serviceability/dcmd/gc/RunFinalizationTest.java on generic-all
Backport-of: 440782e016
2024-07-27 01:26:30 +03:00
Andrew Lu
58b3413ef7 8321107: Add more test cases for JDK-8319372
Backport-of: ecd335d8f4
2024-07-27 01:26:30 +03:00
María Arias de Reyna
c2d500fd26 8316138: Add GlobalSign 2 TLS root certificates
Backport-of: 4083255440
2024-07-27 01:26:30 +03:00
Andrew Lu
be695e6857 8320715: Improve the tests of test/hotspot/jtreg/compiler/intrinsics/float16
Backport-of: 5dcf3a56cb
2024-07-27 01:26:29 +03:00
Matthias Baesken
41a31e5f6e 8331298: avoid alignment checks in UBSAN enabled build
Backport-of: 60b61e588c
2024-07-27 01:26:29 +03:00
Matthias Baesken
d38ee08146 8312218: Print additional debug information when hitting assert(in_hash)
Backport-of: 7cbab1f396
2024-07-27 01:26:29 +03:00
Martin Doerr
465a424c78 8308144: Uncontrolled memory consumption in SSLFlowDelegate.Reader
Backport-of: 099a8f5b2f
2024-07-27 01:26:29 +03:00
Andrew Lu
cfe9967cee 8299023: TestPLABResize.java and TestPLABPromotion.java are failing intermittently
Backport-of: f50df10591
2024-07-27 01:26:29 +03:00
Matthias Baesken
17e96dbaa0 8329663: hs_err file event log entry for thread adding/removing should print current thread
Backport-of: 3ebf8c9359
2024-07-27 01:26:29 +03:00
Matthias Baesken
214344527c 8330615: avoid signed integer overflows in zip_util.c readCen / hashN
Backport-of: 5af6b45eef
2024-07-27 01:26:29 +03:00
Matthias Baesken
1e01fd6048 8331167: UBSan enabled build fails in adlc on macOS
Backport-of: 4edac349a5
2024-07-27 01:26:29 +03:00
Thomas Stuefe
d048cfce16 8331942: On Linux aarch64, CDS archives should be using 64K alignment by default
Backport-of: d2d37c913e
2024-07-27 01:26:29 +03:00
Aleksey Shipilev
23cc63e5bb 8325255: jdk.internal.util.ReferencedKeySet::add using wrong test
Backport-of: a7461de231
2024-07-27 01:26:29 +03:00
Andrew Lu
addb6bca7d 8309871: jdk/jfr/api/consumer/recordingstream/TestSetEndTime.java timed out
Backport-of: b9df827adc
2024-07-27 01:26:29 +03:00
SendaoYan
83ddb89cd7 8311964: Some jtreg tests failing on x86 with error 'unrecognized VM options' (C2 flags)
Backport-of: 024133b089
2024-07-27 01:26:29 +03:00
SendaoYan
5984c32db8 8321925: sun/security/mscapi/KeytoolChangeAlias.java fails with "Alias <246810> does not exist"
Backport-of: b6233c3de7
2024-07-27 01:26:29 +03:00
Aleksey Shipilev
8b6e79c208 8320370: NMT: Change MallocMemorySnapshot to simplify code.
Reviewed-by: stuefe
Backport-of: a7f6016406
2024-07-27 01:26:29 +03:00
Chad Rakoczy
15fea81c62 8325621: Improve jspawnhelper version checks
Backport-of: a232e8fb4e
2024-07-27 01:26:29 +03:00
Matthias Baesken
b8c29686a5 8330524: Linux ppc64le compile warning with clang in os_linux_ppc.cpp
Backport-of: 252c62a66d
2024-07-27 01:26:28 +03:00
Christoph Langer
622f30132a 8330523: Reduce runtime and improve efficiency of KeepAliveTest
Backport-of: 8eac95ec3cd4b215556d788b9ade7a6e2f9deaa3
2024-07-27 01:26:28 +03:00
Christoph Langer
db292f6c9f 8330815: Use pattern matching for instanceof in KeepAliveCache
Backport-of: 0ec3c0b1e698f7ad39b4da2edb062721e4670f58
2024-07-27 01:26:28 +03:00
Liang Mao
51988bf740 8314573: G1: Heap resizing at Remark does not take existing eden regions into account
Backport-of: 762b652912
2024-07-27 01:26:28 +03:00
Liang Mao
803cd32129 8319376: ParallelGC: Forwarded objects found during heap inspection
Backport-of: 59e9981ec2
2024-07-27 01:26:28 +03:00
Aleksey Shipilev
5dab4a8bfe 8310913: Move ReferencedKeyMap to jdk.internal so it may be shared
Reviewed-by: rrich
Backport-of: 6af0af5934
2024-07-27 01:26:28 +03:00
Goetz Lindenmaier
66935065a1 8317007: Add bulk removal of dead nmethods during class unloading
Backport-of: f553819502
2024-07-27 01:26:28 +03:00
Goetz Lindenmaier
69e04d35a1 8310228: Improve error reporting for uncaught native exceptions on Windows
Reviewed-by: stuefe
Backport-of: 38bf1192b6
2024-07-27 01:26:28 +03:00
Alexandru C. Moraru
d0da9faa8b 8309890: TestStringDeduplicationInterned.java waits for the wrong condition
Backport-of: 63fe413d93
2024-07-27 01:26:28 +03:00
Christoph Langer
fabb1fccbc 8331639: [21u]: Bump GHA bootstrap JDK to 21.0.3
Reviewed-by: sgehwolf
2024-07-27 01:26:28 +03:00
Aleksey Shipilev
c8d5edf3b4 8328938: C2 SuperWord: disable vectorization for large stride and scale
Reviewed-by: epeter, simonis
Backport-of: 2931458711
2024-07-27 01:26:28 +03:00
Amit Kumar
a353994f18 8310513: [s390x] Intrinsify recursive ObjectMonitor locking
Reviewed-by: lucy
Backport-of: 47df14590c
2024-07-27 01:26:28 +03:00
Amit Kumar
394248a03e 8330011: [s390x] update block-comments to make code consistent
Reviewed-by: lucy
Backport-of: 01bda278d6
2024-07-27 01:26:28 +03:00
Amit Kumar
3de7d9f6ed 8326201: [S390] Need to bailout cleanly if creation of stubs fails when code cache is out of space
Backport-of: d5f3d5c8cc
2024-07-27 01:26:28 +03:00
SendaoYan
3aff423e35 8331331: :tier1 target explanation in doc/testing.md is incorrect
Backport-of: 04271dfe7a
2024-07-27 01:26:27 +03:00
Aleksey Shipilev
1dc5b6a5cf 8328703: Illegal accesses in Java_jdk_internal_org_jline_terminal_impl_jna_linux_CLibraryImpl_ioctl0
Backport-of: 87e864bf21
2024-07-27 01:26:27 +03:00
Joachim Kern
f36ad76025 8329850: [AIX] Allow loading of different members of same shared library archive
Backport-of: cfd19f0176
2024-07-27 01:26:27 +03:00
Gui Cao
7ab5582d6b 8330094: RISC-V: Save and restore FRM in the call stub
Reviewed-by: fyang
Backport-of: b0496096dc
2024-07-27 01:26:27 +03:00
Goetz Lindenmaier
cb24b49630 8317809: Insertion of free code blobs into code cache can be very slow during class unloading
Reviewed-by: phh, adinn
Backport-of: 30817b7423
2024-07-27 01:26:27 +03:00
Zhengyu Gu
cb3b6b4d00 8328744: Parallel: Parallel GC throws OOM before heap is fully expanded
Backport-of: bf8146eac24ba8e00d1794ef7134ecf2476cf897
2024-07-27 01:26:27 +03:00
Aleksey Shipilev
d259e821ec 8328822: C2: "negative trip count?" assert failure in profile predicate code
Backport-of: 2ceeb6c001
2024-07-27 01:26:27 +03:00
Aleksey Shipilev
d0d4691c43 8324121: SIGFPE in PhaseIdealLoop::extract_long_range_checks
8329163: C2: possible overflow in PhaseIdealLoop::extract_long_range_checks()

Backport-of: cb2a671359
2024-07-27 01:26:27 +03:00
Bernhard Urban-Forster
173b242e38 8326974: ODR violation in macroAssembler_aarch64.cpp
Backport-of: b972997af7
2024-07-27 01:26:27 +03:00
Zhengyu Gu
6bcff2467b 8319713: Parallel: Remove PSAdaptiveSizePolicy::should_full_GC
Backport-of: 4bcda60266
2024-07-27 01:26:27 +03:00
Amit Kumar
fece3c4272 8312014: [s390x] TestSigInfoInHsErrFile.java Failure
Reviewed-by: lucy
Backport-of: 6f6621303a
2024-07-27 01:26:27 +03:00
Aleksey Shipilev
d8af5cf4a3 8322962: Upcall stub might go undetected when freezing frames
Backport-of: 93feda3d9a
2024-07-27 01:26:27 +03:00
Aleksey Shipilev
c080688e33 8325095: C2: bailout message broken: ResourceArea allocated string used after free
Reviewed-by: phh
Backport-of: c589555845
2024-07-27 01:26:27 +03:00
Aleksey Shipilev
675d8a7411 8328168: Epsilon: Premature OOM when allocating object larger than uncommitted heap size
Backport-of: 7baec66222
2024-07-27 01:26:27 +03:00
Robbin Ehn
59f3fea4f4 8330156: RISC-V: Range check auipc + signed 12 imm instruction
Backport-of: 8990864a53
2024-07-27 01:26:26 +03:00
Goetz Lindenmaier
a940476138 8321713: Harmonize executeTestJvm with create[Limited]TestJavaProcessBuilder
Reviewed-by: lucy
Backport-of: cbe329b90a
2024-07-27 01:26:26 +03:00
SendaoYan
18af1517a5 8331113: createJMHBundle.sh support configurable maven repo mirror
Backport-of: ce9eac3819
2024-07-27 01:26:26 +03:00
Aleksey Shipilev
3f7e09465d 8309142: Refactor test/langtools/tools/javac/versions/Versions.java
8321182: SourceExample.SOURCE_14 comment should refer to 'switch expressions' instead of 'text blocks'

Reviewed-by: phh
Backport-of: 7d82479096
2024-07-27 01:26:26 +03:00
Sergey Bylokhov
30b3b8487d 8328194: Add a test to check default rendering engine
Backport-of: c013fa1811
2024-07-27 01:26:26 +03:00
Amos Shi
63da65968b 8324733: [macos14] Problem list tests which fail due to macOS bug described in JDK-8322653
Backport-of: d1e676360d
2024-07-27 01:26:26 +03:00
María Arias de Reyna
c3d22155c6 8320061: [nmt] Multiple issues with peak accounting
Reviewed-by: shade, stuefe
Backport-of: dc256fbc64
2024-07-27 01:26:26 +03:00
Jonathan Dowland
ca84f1bdc0 8315889: Open source several Swing HTMLDocument related tests
Backport-of: 8f46abc938
2024-07-27 01:26:26 +03:00
Aleksey Shipilev
f92d18c1df 8329013: StackOverflowError when starting Apache Tomcat with signed jar
Backport-of: 925d82931c
2024-07-27 01:26:26 +03:00
Aleksey Shipilev
67e255b3a6 8324933: ConcurrentHashTable::statistics_calculate synchronization is expensive
Backport-of: 0e2fdc95ae
2024-07-27 01:26:26 +03:00
Aleksey Shipilev
11d63c4d16 8327989: java/net/httpclient/ManyRequest.java should not use "localhost" in URIs
Backport-of: da4dd7c008
2024-07-27 01:26:26 +03:00
Aleksey Shipilev
63ba331053 8320924: Improve heap dump performance by optimizing archived object checks
Backport-of: f32ab8cc47
2024-07-27 01:26:26 +03:00
Aleksey Shipilev
c06c43466d 8320707: Virtual thread test updates
Reviewed-by: simonis
Backport-of: b67b71cd87
2024-07-27 01:26:26 +03:00
Aleksey Shipilev
e3e16e764c 8310355: Move the stub test from initialize_final_stubs() to test/hotspot/gtest
Backport-of: 4b9ec82451
2024-07-27 01:26:26 +03:00
Sonia Zaldana Calles
cdd8ee196a 8327096: (fc) java/nio/channels/FileChannel/Size.java fails on partition incapable of creating large files
Backport-of: 94b4ed5766
2024-07-27 01:26:25 +03:00
Sonia Zaldana Calles
6879bb94cc 8327971: Multiple ASAN errors reported for metaspace
8327988: When running ASAN, disable dangerous NMT test

Reviewed-by: stuefe, shade
Backport-of: 9e566d76d1
2024-07-27 01:26:25 +03:00
María Arias de Reyna
4808eebaf7 8293850: need a largest_committed metric for each category of NMT's output
Reviewed-by: stuefe
Backport-of: 8647f001bb
2024-07-27 01:26:25 +03:00
Sonia Zaldana Calles
f22aad25e7 8316242: Opensource SwingGraphics manual test
Backport-of: a57b9dab6c
2024-07-27 01:26:25 +03:00
Sonia Zaldana Calles
607dfd5541 8316154: Opensource JTextArea manual tests
Backport-of: 33c62e4fff
2024-07-27 01:26:25 +03:00
Goetz Lindenmaier
b99d5a67a3 8328957: Update PKCS11Test.java to not use hardcoded path
Backport-of: 16576b87b7
2024-07-27 01:26:25 +03:00
Goetz Lindenmaier
2b94d42631 8320525: G1: G1UpdateRemSetTrackingBeforeRebuild::distribute_marked_bytes accesses partially unloaded klass
Backport-of: 21d361e944
2024-07-27 01:26:25 +03:00
Goetz Lindenmaier
9701ab0ca9 8320331: G1 Full GC Heap verification relies on metadata not reset before verification
Backport-of: 1629a9059b
2024-07-27 01:26:25 +03:00
Amos Shi
8601821c08 8187759: Background not refreshed when painting over a transparent JFrame
Backport-of: 04d43c435d
2024-07-27 01:26:25 +03:00
Amos Shi
0cacb7a330 8327136: javax/management/remote/mandatory/notif/NotifReconnectDeadlockTest.java fails on libgraal
Backport-of: 8f0fb27dec
2024-07-27 01:26:25 +03:00
Amos Shi
5cc3ff11c0 8315824: Open source several Swing Text/HTML related tests
Backport-of: c11f8352e9
2024-07-27 01:26:25 +03:00
Amos Shi
df5e87a4bd 8326006: Allow TEST_VM_FLAGLESS to set flagless mode
Backport-of: d10f277bd3
2024-07-27 01:26:25 +03:00
Amos Shi
a65715d612 8315071: Modify TrayIconScalingTest.java, PrintLatinCJKTest.java to use new PassFailJFrame's builder pattern usage
Backport-of: 31e26814db
2024-07-27 01:26:25 +03:00
Goetz Lindenmaier
56b5e29d6d 8327474: Review use of java.io.tmpdir in jdk tests
Backport-of: 375bfac8e7
2024-07-27 01:26:25 +03:00
Goetz Lindenmaier
e017e50528 8328555: hidpi problems for test java/awt/Dialog/DialogAnotherThread/JaWSTest.java
Backport-of: 23ebd9c3c6
2024-07-27 01:26:25 +03:00
Goetz Lindenmaier
eb299bad4e 8327180: Failed: java/io/ObjectStreamClass/ObjectStreamClassCaching.java#G1
Backport-of: 85fc47c81a
2024-07-27 01:26:24 +03:00
Goetz Lindenmaier
12ace99fff 8327486: java/util/Properties/PropertiesStoreTest.java fails "Text 'xxx' could not be parsed at index 20" after 8174269
Backport-of: e21da4caac
2024-07-27 01:26:24 +03:00
Vladimir Petko
f19adae4b8 8325028: (ch) Pipe channels should lazily set socket to non-blocking mode on first use by virtual thread
Backport-of: d1099033ac
2024-07-27 01:26:24 +03:00
Aleksey Shipilev
97154510d6 8328166: Epsilon: 'EpsilonHeap::allocate_work' misuses the parameter 'size' as size in bytes
Backport-of: 90ab52e598
2024-07-27 01:26:24 +03:00
Goetz Lindenmaier
d38bce236a 8319955: Improve dependencies removal during class unloading
Reviewed-by: stuefe
Backport-of: fbe19378c3
2024-07-27 01:26:24 +03:00
Goetz Lindenmaier
4d5abae50e 8318109: Writing JFR records while a CHT has taken its lock asserts in rank checking
Reviewed-by: mbaesken, sgehwolf
Backport-of: 9f767aa44b
2024-07-27 01:26:24 +03:00
Goetz Lindenmaier
73df33e11c 8317600: VtableStubs::stub_containing() table load not ordered wrt to stores
Reviewed-by: adinn
Backport-of: c566dfccf8
2024-07-27 01:26:24 +03:00
Goetz Lindenmaier
1f5f2b10b3 8316959: Improve InlineCacheBuffer pending queue management
Reviewed-by: roland
Backport-of: c9985720b9
2024-07-27 01:26:24 +03:00
Goetz Lindenmaier
08c1f8b1da 8323685: PrintSystemDictionaryAtExit has mutex rank assert
Backport-of: 2865afe759
2024-07-27 01:26:24 +03:00
Goetz Lindenmaier
9879e0ca9a 8315503: G1: Code root scan causes long GC pauses due to imbalanced iteration
8317440: Lock rank checking fails when code root set is modified with the Servicelock held after JDK-8315503
8318720: G1: Memory leak in G1CodeRootSet after JDK-8315503

Reviewed-by: sgehwolf, shade
Backport-of: 795e5dcc85
2024-07-27 01:26:24 +03:00
Andrew Lu
4406aab401 8318599: HttpURLConnection cache issues leading to crashes in JGSS w/ native GSS introduced by 8303809
Backport-of: f1a24f6d48
2024-07-27 01:26:24 +03:00
Aleksey Shipilev
e9ac79a51b 8318986: Improve GenericWaitBarrier performance
Backport-of: 30462f9da4
2024-07-27 01:26:24 +03:00
Gui Cao
b09bfc5223 8326936: RISC-V: Shenandoah GC crashes due to incorrect atomic memory operations
8316186: RISC-V: Remove PlatformCmpxchg<4>
8330242: RISC-V: Simplify and remove CORRECT_COMPILER_ATOMIC_SUPPORT in atomic_linux_riscv.hpp

Reviewed-by: fyang
Backport-of: a089ed2b92
2024-07-27 01:26:24 +03:00
Robert Toyonaga
d3d6d6c6a2 8305931: jdk/jfr/jcmd/TestJcmdDumpPathToGCRoots.java failed with "Expected chains but found none"
Backport-of: 65be5e0c54
2024-07-27 01:26:24 +03:00
Robert Toyonaga
dff7c400a8 8326521: JFR: CompilerPhase event test fails on windows 32 bit
Backport-of: 96530bcc07
2024-07-27 01:26:24 +03:00
Goetz Lindenmaier
ea084dd706 8328988: [macos14] Problem list LightweightEventTest.java which fails due to macOS bug described in JDK-8322653
Backport-of: 2374d1e334ba0528b39239a01fe52d5843e678df
2024-07-27 01:26:23 +03:00
Goetz Lindenmaier
901ca4b1fd 8327631: Update IANA Language Subtag Registry to Version 2024-03-07
Backport-of: d5b95a0ed3
2024-07-27 01:26:23 +03:00
Goetz Lindenmaier
52eabf047a 8320714: java/util/Locale/LocaleProvidersRun.java and java/util/ResourceBundle/modules/visibility/VisibilityTest.java timeout after passing
Backport-of: 69c0b24386
2024-07-27 01:26:23 +03:00
Andrew Lu
381ef91eb2 8328540: test javax/swing/JSplitPane/4885629/bug4885629.java fails on windows hidpi
Backport-of: fa823bd21c
2024-07-27 01:26:23 +03:00
Severin Gehwolf
9d26e8c543 8329961: Buffer overflow in os::Linux::kernel_version
Backport-of: 279ed0ddd5
2024-07-27 01:26:23 +03:00
Matthias Baesken
d3faf1711c 8328589: unify os::breakpoint among posix platforms
Backport-of: 93d1700f23
2024-07-27 01:26:23 +03:00
Sidraya Jayagond
d9904c5c68 8329545: [s390x] Fix garbage value being passed in Argument Register
Backport-of: e0fd6c4c9e
2024-07-27 01:26:23 +03:00
Gui Cao
bf27b1c7a2 8329823: RISC-V: Need to sync CPU features with related JVM flags
Backport-of: b9331cd25c
2024-07-27 01:26:23 +03:00
Goetz Lindenmaier
df11b82b8a 8320349: Simplify FileChooserSymLinkTest.java by using single-window testUI
Backport-of: b1cb37432a
2024-07-27 01:26:23 +03:00
Goetz Lindenmaier
af2affc89f 8318322: Update IANA Language Subtag Registry to Version 2023-10-16
Backport-of: cc8f8da293
2024-07-27 01:26:23 +03:00
Goetz Lindenmaier
3eb7195199 8303959: tools/jpackage/share/RuntimePackageTest.java fails with java.lang.AssertionError missing files
Backport-of: 5a6aa569aa
2024-07-27 01:26:23 +03:00
Goetz Lindenmaier
b586b4ecad 8313899: JVMCI exception Translation can fail in TranslatedException.<clinit>
Backport-of: 6f5c903d10
2024-07-27 01:26:23 +03:00
Goetz Lindenmaier
0358df57bd 8313702: Update IANA Language Subtag Registry to Version 2023-08-02
Backport-of: 1da82a34b1
2024-07-27 01:26:23 +03:00
Christoph Langer
b641743e76 8325579: Inconsistent behavior in com.sun.jndi.ldap.Connection::createSocket
Backport-of: 92d6fa4abec1fdf8e57723e4490be0ba4f97e59d
2024-07-27 01:26:23 +03:00
Soumadipta Roy
64c051f20c 8316608: Enable parallelism in vmTestbase/gc/vector tests
Backport-of: f61499c73f
2024-07-27 01:26:22 +03:00
Andrew Lu
d456a09527 8281658: Add a security category to the java -XshowSettings option
Backport-of: 2e12a123c9
2024-07-27 01:26:22 +03:00
Aleksey Shipilev
98ae718379 8328702: C2: Crash during parsing because sub type check is not folded
Backport-of: e5e21a8a6e
2024-07-27 01:26:22 +03:00
Goetz Lindenmaier
de63ba2d49 8328037: Test java/util/Formatter/Padding.java has unnecessary high heap requirement after JDK-8326718
Backport-of: 128e60a29f
2024-07-27 01:26:22 +03:00
Goetz Lindenmaier
49f2bd4cd9 8321718: ProcessTools.executeProcess calls waitFor before logging
Backport-of: 9ab29f8dcd
2024-07-27 01:26:22 +03:00
Goetz Lindenmaier
72d9116346 8318585: Rename CodeCache::UnloadingScope to UnlinkingScope
Reviewed-by: sgehwolf
Backport-of: 4eab39d941
2024-07-27 01:26:22 +03:00
Goetz Lindenmaier
48c16d7c3f 8311881: jdk/javax/swing/ProgressMonitor/ProgressTest.java does not show the ProgressMonitorInputStream all the time
Backport-of: 197981b431
2024-07-27 01:26:22 +03:00
Aleksey Shipilev
8d39a85d7d 8329570: G1: Excessive is_obj_dead_cond calls in verification
Backport-of: 29992e1fca
2024-07-27 01:26:22 +03:00
Amos Shi
0d53a7137c 8305645: System Tray icons get corrupted when Windows primary monitor changes
Backport-of: 6cd370e04b
2024-07-27 01:26:22 +03:00
Matthias Baesken
995c48c19d 8328604: remove on_aix() function
Backport-of: 940d1965f8
2024-07-27 01:26:22 +03:00
Gui Cao
98f4062a00 8315652: RISC-V: Features string uses wrong separator for jtreg
Reviewed-by: rehn
Backport-of: cbbfa0ddfb
2024-07-27 01:26:22 +03:00
Aleksey Shipilev
633f3bdfa3 8319650: Improve heap dump performance with class metadata caching
Reviewed-by: phh
Backport-of: 03db82818b
2024-07-27 01:26:22 +03:00
Goetz Lindenmaier
8a4ea25184 8325203: System.exit(0) kills the launched 3rd party application
Backport-of: 6944537c3e
2024-07-27 01:26:22 +03:00
Elif Aslan
84ac27bb85 8325567: jspawnhelper without args fails with segfault
Backport-of: 2627470946
2024-07-27 01:26:22 +03:00
Goetz Lindenmaier
e2dce0c6d7 8326718: Test java/util/Formatter/Padding.java should timeout on large inputs before fix in JDK-8299677
Backport-of: 4f336085d1
2024-07-27 01:26:22 +03:00
Goetz Lindenmaier
425f5728f5 8316451: 6 java/lang/instrument/PremainClass tests ignore VM flags
Backport-of: 9029bf644e
2024-07-27 01:26:21 +03:00
Goetz Lindenmaier
9e3c1d3c74 8319578: Few java/lang/instrument ignore test.java.opts and accept test.vm.opts only
Backport-of: 3ebe6c192a
2024-07-27 01:26:21 +03:00
Goetz Lindenmaier
df0d109991 8321163: [test] OutputAnalyzer.getExitValue() unnecessarily logs even when process has already completed
Backport-of: 672f37324f
2024-07-27 01:26:21 +03:00
Goetz Lindenmaier
d6bf10e5e1 8314975: JavadocTester should set source path if not specified
Backport-of: 2f4d601a56
2024-07-27 01:26:21 +03:00
Goetz Lindenmaier
70cf2eb48b 8293069: Make -XX:+Verbose less verbose
Backport-of: 238c51e621
2024-07-27 01:26:21 +03:00
Dan Lutker
1c5a1724fb 8294699: Launcher causes lingering busy cursor
Backport-of: d3df3eb5d7
2024-07-27 01:26:21 +03:00
Goetz Lindenmaier
656c8b68f0 8316460: 4 javax/management tests ignore VM flags
Backport-of: d39b7bab27
2024-07-27 01:26:21 +03:00
Goetz Lindenmaier
52fe16e391 8318962: Update ProcessTools javadoc with suggestions in 8315097
Backport-of: 7e4cb2f09d
2024-07-27 01:26:21 +03:00
Goetz Lindenmaier
193fc1d715 8308453: Convert JKS test keystores in test/jdk/javax/net/ssl/etc to PKCS12
Backport-of: 1696603ccd
2024-07-27 01:26:21 +03:00
Goetz Lindenmaier
fdd2c37a20 8303773: Replace "main.wrapper" with "test.thread.factory" property in test code
Backport-of: 89987dbf87
2024-07-27 01:26:21 +03:00
Matthias Baesken
b8aaf0538e 8327468: Do not restart close if errno is EINTR [macOS/linux]
Backport-of: 481c866df8
2024-07-27 01:26:21 +03:00
Matthias Baesken
737d554b9e 8328709: AIX os::get_summary_cpu_info support Power 10
Backport-of: b235682a18
2024-07-27 01:26:21 +03:00
Matthias Baesken
898b266359 8328776: [AIX] remove checked_vmgetinfo, use vmgetinfo directly
Backport-of: cf9b5a71bd
2024-07-27 01:26:21 +03:00
Goetz Lindenmaier
59a43bda0a 8319153: Fix: Class is a raw type in ProcessTools
Backport-of: 1c2ea1d27b
2024-07-27 01:26:20 +03:00
Goetz Lindenmaier
4a1eff6d21 8304839: Move TestScaffold.main() to the separate class DebugeeWrapper
Backport-of: ee9776fa23
2024-07-27 01:26:20 +03:00
Goetz Lindenmaier
8d368c0428 8288936: Wrong lock ordering writing G1HeapRegionTypeChange JFR event
Backport-of: 0eb0997ae4
2024-07-27 01:26:20 +03:00
Aleksey Shipilev
c3a403ee2e 8328638: Fallback option for POST-only OCSP requests
8329213: Better validation for com.sun.security.ocsp.useget option

Reviewed-by: serb
Backport-of: 614db2ea9e
2024-07-27 01:26:20 +03:00
1966 changed files with 49434 additions and 73948 deletions

View File

@@ -131,7 +131,6 @@ jobs:
id: create-sysroot
run: >
sudo debootstrap
--no-merged-usr
--arch=${{ matrix.debian-arch }}
--verbose
--include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype-dev,libpng-dev
@@ -152,9 +151,6 @@ jobs:
rm -rf sysroot/usr/{sbin,bin,share}
rm -rf sysroot/usr/lib/{apt,gcc,udev,systemd}
rm -rf sysroot/usr/libexec/gcc
# /{bin,sbin,lib}/ are not symbolic links to /usr/{bin,sbin,lib}/ when debootstrap with --no-merged-usr
rm -rf sysroot/{sbin,bin}
rm -rf sysroot/lib/{udev,systemd}
if: steps.create-sysroot.outcome == 'success' && steps.get-cached-sysroot.outputs.cache-hit != 'true'
- name: 'Remove broken sysroot'

View File

@@ -31,7 +31,7 @@ on:
platforms:
description: 'Platform(s) to execute on (comma separated, e.g. "linux-x64, macos, aarch64")'
required: true
default: 'linux-x64, linux-x86-hs, linux-x64-variants, linux-cross-compile, macos-x64, macos-aarch64, windows-x64, windows-aarch64, docs'
default: 'linux-x64, linux-x86, linux-x64-variants, linux-cross-compile, macos-x64, macos-aarch64, windows-x64, windows-aarch64, docs'
configure-arguments:
description: 'Additional configure arguments'
required: false
@@ -54,7 +54,7 @@ jobs:
runs-on: ubuntu-22.04
outputs:
linux-x64: ${{ steps.include.outputs.linux-x64 }}
linux-x86-hs: ${{ steps.include.outputs.linux-x86-hs }}
linux-x86: ${{ steps.include.outputs.linux-x86 }}
# additional build options for linux-x64 are disabled
# linux-x64-variants: ${{ steps.include.outputs.linux-x64-variants }}
linux-cross-compile: ${{ steps.include.outputs.linux-cross-compile }}
@@ -107,7 +107,7 @@ jobs:
}
echo "linux-x64=$(check_platform linux-x64 linux x64)" >> $GITHUB_OUTPUT
echo "linux-x86-hs=$(check_platform linux-x86-hs linux x86)" >> $GITHUB_OUTPUT
echo "linux-x86=$(check_platform linux-x86 linux x86)" >> $GITHUB_OUTPUT
echo "linux-x64-variants=$(check_platform linux-x64-variants variants)" >> $GITHUB_OUTPUT
echo "linux-cross-compile=$(check_platform linux-cross-compile cross-compile)" >> $GITHUB_OUTPUT
echo "macos-x64=$(check_platform macos-x64 macos x64)" >> $GITHUB_OUTPUT
@@ -131,13 +131,12 @@ jobs:
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.select.outputs.linux-x64 == 'true'
build-linux-x86-hs:
name: linux-x86-hs
build-linux-x86:
name: linux-x86
needs: select
uses: ./.github/workflows/build-linux.yml
with:
platform: linux-x86
make-target: 'hotspot'
gcc-major-version: '10'
gcc-package-suffix: '-multilib'
apt-architecture: 'i386'
@@ -147,7 +146,7 @@ jobs:
extra-conf-options: '--with-target-bits=32'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.select.outputs.linux-x86-hs == 'true'
if: needs.select.outputs.linux-x86 == 'true'
build-linux-x64-hs-nopch:
name: linux-x64-hs-nopch
@@ -236,7 +235,7 @@ jobs:
with:
platform: macos-aarch64
runs-on: 'macos-14'
xcode-toolset-version: '15.4'
xcode-toolset-version: '14.3.1'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.select.outputs.macos-aarch64 == 'true'
@@ -297,6 +296,16 @@ jobs:
bootjdk-platform: linux-x64
runs-on: ubuntu-22.04
test-linux-x86:
name: linux-x86
needs:
- build-linux-x86
uses: ./.github/workflows/test.yml
with:
platform: linux-x86
bootjdk-platform: linux-x64
runs-on: ubuntu-22.04
test-macos-x64:
name: macos-x64
needs:
@@ -306,7 +315,6 @@ jobs:
platform: macos-x64
bootjdk-platform: macos-x64
runs-on: macos-13
xcode-toolset-version: '14.3.1'
test-macos-aarch64:
name: macos-aarch64
@@ -317,7 +325,6 @@ jobs:
platform: macos-aarch64
bootjdk-platform: macos-aarch64
runs-on: macos-14
xcode-toolset-version: '15.4'
test-windows-x64:
name: windows-x64
@@ -336,7 +343,7 @@ jobs:
if: always()
needs:
- build-linux-x64
- build-linux-x86-hs
- build-linux-x86
- build-linux-x64-hs-nopch
- build-linux-x64-hs-zero
- build-linux-x64-hs-minimal
@@ -347,28 +354,31 @@ jobs:
- build-windows-x64
- build-windows-aarch64
- test-linux-x64
- test-linux-x86
- test-macos-x64
- test-macos-aarch64
- test-windows-x64
steps:
# Hack to get hold of the api environment variables that are only defined for actions
- name: 'Get API configuration'
id: api
uses: actions/github-script@v7
with:
script: 'return { url: process.env["ACTIONS_RUNTIME_URL"], token: process.env["ACTIONS_RUNTIME_TOKEN"] }'
- name: 'Remove bundle artifacts'
run: |
# Find and remove all bundle artifacts
# See: https://docs.github.com/en/rest/actions/artifacts?apiVersion=2022-11-28
ALL_ARTIFACT_IDS="$(curl -sL \
-H 'Accept: application/vnd.github+json' \
-H 'Authorization: Bearer ${{ github.token }}' \
-H 'X-GitHub-Api-Version: 2022-11-28' \
'${{ github.api_url }}/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts?per_page=100')"
BUNDLE_ARTIFACT_IDS="$(echo "$ALL_ARTIFACT_IDS" | jq -r -c '.artifacts | map(select(.name|startswith("bundles-"))) | .[].id')"
for id in $BUNDLE_ARTIFACT_IDS; do
echo "Removing $id"
curl -sL \
-X DELETE \
-H 'Accept: application/vnd.github+json' \
-H 'Authorization: Bearer ${{ github.token }}' \
-H 'X-GitHub-Api-Version: 2022-11-28' \
"${{ github.api_url }}/repos/${{ github.repository }}/actions/artifacts/$id" \
ALL_ARTIFACT_URLS="$(curl -s \
-H 'Accept: application/json;api-version=6.0-preview' \
-H 'Authorization: Bearer ${{ fromJson(steps.api.outputs.result).token }}' \
'${{ fromJson(steps.api.outputs.result).url }}_apis/pipelines/workflows/${{ github.run_id }}/artifacts?api-version=6.0-preview')"
BUNDLE_ARTIFACT_URLS="$(echo "$ALL_ARTIFACT_URLS" | jq -r -c '.value | map(select(.name|startswith("bundles-"))) | .[].url')"
for url in $BUNDLE_ARTIFACT_URLS; do
echo "Removing $url"
curl -s \
-H 'Accept: application/json;api-version=6.0-preview' \
-H 'Authorization: Bearer ${{ fromJson(steps.api.outputs.result).token }}' \
-X DELETE "$url" \
|| echo "Failed to remove bundle"
done

View File

@@ -37,9 +37,6 @@ on:
runs-on:
required: true
type: string
xcode-toolset-version:
required: false
type: string
env:
# These are needed to make the MSYS2 bash work properly
@@ -150,7 +147,7 @@ jobs:
run: |
# On macOS we need to install some dependencies for testing
brew install make
sudo xcode-select --switch /Applications/Xcode_${{ inputs.xcode-toolset-version }}.app/Contents/Developer
sudo xcode-select --switch /Applications/Xcode_14.3.1.app/Contents/Developer
# This will make GNU make available as 'make' and not only as 'gmake'
echo '/usr/local/opt/make/libexec/gnubin' >> $GITHUB_PATH
if: runner.os == 'macOS'

View File

@@ -1,11 +1,10 @@
[general]
project=jdk-updates
jbs=JDK
version=21.0.6
version=21.0.4
[checks]
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists
warning=issuestitle,binary
[repository]
tags=(?:jdk-(?:[1-9]([0-9]*)(?:\.(?:0|[1-9][0-9]*)){0,4})(?:\+(?:(?:[0-9]+))|(?:-ga)))|(?:jdk[4-9](?:u\d{1,3})?-(?:(?:b\d{2,3})|(?:ga)))|(?:hs\d\d(?:\.\d{1,2})?-b\d\d)

View File

@@ -110,32 +110,34 @@ coverage of all the details.
### Linux (Docker)
Create a container:
```
$ cd ./jb/project/docker/
$ ./mkdocker_x64.sh
$ cd jb/project/docker
$ docker build .
...
Successfully built 942ea9900054
```
Run these commands in the new container:
```
$ docker run -v `pwd`../../../../:/JetBrainsRuntime -it jetbrains/runtime:oraclelinux8_x64
# yum install java-21-openjdk-devel
$ docker run -v `pwd`../../../../:/JetBrainsRuntime -it 942ea9900054
# cd /JetBrainsRuntime
# BOOT_JDK=/usr/lib/jvm/java-21/ ./jb/project/tools/linux/scripts/mkimages_x64.sh 99 nomod
# sh ./configure
# make images CONF=linux-x86_64-normal-server-release
```
### Ubuntu Linux
Install the necessary tools, libraries, and headers with:
```
$ sudo wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | tee /etc/apt/trusted.gpg.d/lunarg.asc
$ sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-noble.list https://packages.lunarg.com/vulkan/lunarg-vulkan-noble.list
$ sudo apt update
$ sudo apt-get -y install openjdk-21-jdk file zip unzip autoconf make build-essential libx11-dev libxext-dev libxrender-dev \
libxtst-dev libxt-dev libxrandr-dev libcups2-dev libfontconfig1-dev libasound2-dev libspeechd-dev libwayland-dev \
libxkbcommon-x11-0 vulkan-sdk vulkan-utility-libraries-dev
$ sudo apt-get install autoconf make build-essential libx11-dev libxext-dev libxrender-dev \
libxtst-dev libxt-dev libxrandr-dev libcups2-dev libfontconfig1-dev libasound2-dev libwayland-dev \
libxkbcommon-x11-0
```
Get Java 19 (for instance, [Azul Zulu Builds of OpenJDK 19](https://www.azul.com/downloads/?version=java-19-sts&os=linux&package=jdk)).
Then run the following:
```
$ cd /JetBrainsRuntime
$ BOOT_JDK=/usr/lib/jvm/java-21-openjdk-amd64 ./jb/project/tools/linux/scripts/mkimages_x64.sh 99 nomod
$ cd JetBrainsRuntime
$ git checkout main
$ sh ./configure
$ make images
```
This will build the release configuration under `./build/linux-x86_64-server-release/`.
@@ -167,18 +169,6 @@ $ make images
```
This will build the release configuration under `./build/windows-x86_64-server-release/`.
#### Enable optional NVDA screen reader support
If you want to add support of a11y announcing via [NVDA screen reader](https://www.nvaccess.org/about-nvda/),
you will need to bundle the NVDA Controller Client library.
You can do it with the following steps:
1. Download the NVDA Controller Client library. You can find the link in its official README [here](https://github.com/nvaccess/nvda/blob/master/extras/controllerClient/readme.md)
2. Pass the path to the unpacked package to `configure` via an additional flag `--with-nvdacontrollerclient=<path>`.
The build system will search the required library files under `<path>/<target-arch>`.
#### Disable optional JAWS screen reader support
JBR is built with built-in support of JAWS screen reader.
If you want to disable it, run `configure` with the additional flag `--disable-jaws-client`.
### macOS
Install the following:
* Xcode command line developer tools and `autoconf` via [Homebrew](https://brew.sh/).

View File

@@ -1,3 +0,0 @@
# JDK Vulnerabilities
Please follow the process outlined in the [OpenJDK Vulnerability Policy](https://openjdk.org/groups/vulnerability/report) to disclose vulnerabilities in the JDK.

View File

@@ -569,9 +569,10 @@ be accepted by <code>configure</code>.</p>
<code>--with-toolchain-type=clang</code>.</p>
<h3 id="apple-xcode">Apple Xcode</h3>
<p>The oldest supported version of Xcode is 8.</p>
<p>You will need to download Xcode either from the App Store or specific
versions can be easily located via the <a
href="https://xcodereleases.com">Xcode Releases</a> website.</p>
<p>You will need the Xcode command line developer tools to be able to
build the JDK. (Actually, <em>only</em> the command line tools are
needed, not the IDE.) The simplest way to install these is to run:</p>
<pre><code>xcode-select --install</code></pre>
<p>When updating Xcode, it is advisable to keep an older version for
building the JDK. To use a specific version of Xcode you have multiple
options:</p>

View File

@@ -366,9 +366,12 @@ To use clang instead of gcc on Linux, use `--with-toolchain-type=clang`.
The oldest supported version of Xcode is 8.
You will need to download Xcode either from the App Store or specific versions
can be easily located via the [Xcode Releases](https://xcodereleases.com)
website.
You will need the Xcode command line developer tools to be able to build
the JDK. (Actually, *only* the command line tools are needed, not the IDE.)
The simplest way to install these is to run:
```
xcode-select --install
```
When updating Xcode, it is advisable to keep an older version for building the JDK.
To use a specific version of Xcode you have multiple options:

View File

@@ -72,9 +72,6 @@ id="toc-notes-for-specific-tests">Notes for Specific Tests</a>
<li><a href="#non-us-locale" id="toc-non-us-locale">Non-US
locale</a></li>
<li><a href="#pkcs11-tests" id="toc-pkcs11-tests">PKCS11 Tests</a></li>
<li><a href="#testing-with-alternative-security-providers"
id="toc-testing-with-alternative-security-providers">Testing with
alternative security providers</a></li>
<li><a href="#client-ui-tests" id="toc-client-ui-tests">Client UI
Tests</a></li>
</ul></li>
@@ -592,18 +589,6 @@ element of the appropriate <code>@Artifact</code> class. (See
JTREG=&quot;JAVA_OPTIONS=-Djdk.test.lib.artifacts.nsslib-linux_aarch64=/path/to/NSS-libs&quot;</code></pre>
<p>For more notes about the PKCS11 tests, please refer to
test/jdk/sun/security/pkcs11/README.</p>
<h3 id="testing-with-alternative-security-providers">Testing with
alternative security providers</h3>
<p>Some security tests use a hardcoded provider for
<code>KeyFactory</code>, <code>Cipher</code>,
<code>KeyPairGenerator</code>, <code>KeyGenerator</code>,
<code>AlgorithmParameterGenerator</code>, <code>KeyAgreement</code>,
<code>Mac</code>, <code>MessageDigest</code>, <code>SecureRandom</code>,
<code>Signature</code>, <code>AlgorithmParameters</code>,
<code>Configuration</code>, <code>Policy</code>, or
<code>SecretKeyFactory</code> objects. Specify the
<code>-Dtest.provider.name=NAME</code> property to use a different
provider for the service(s).</p>
<h3 id="client-ui-tests">Client UI Tests</h3>
<h4 id="system-key-shortcuts">System key shortcuts</h4>
<p>Some Client UI tests use key sequences which may be reserved by the

View File

@@ -615,15 +615,6 @@ $ make test TEST="jtreg:sun/security/pkcs11/Secmod/AddTrustedCert.java" \
For more notes about the PKCS11 tests, please refer to
test/jdk/sun/security/pkcs11/README.
### Testing with alternative security providers
Some security tests use a hardcoded provider for `KeyFactory`, `Cipher`,
`KeyPairGenerator`, `KeyGenerator`, `AlgorithmParameterGenerator`,
`KeyAgreement`, `Mac`, `MessageDigest`, `SecureRandom`, `Signature`,
`AlgorithmParameters`, `Configuration`, `Policy`, or `SecretKeyFactory` objects.
Specify the `-Dtest.provider.name=NAME` property to use a different provider for
the service(s).
### Client UI Tests
#### System key shortcuts

View File

@@ -1 +1 @@
1.0.2
1.0.0

View File

@@ -0,0 +1,46 @@
# NOTE: This Dockerfile is meant to be used from the mkdocker_aarch64.sh script.
# Pull a concrete version of Linux that does NOT recieve updates after it's
# been created. This is so that the image is as stable as possible to make
# image creation reproducible.
# NB: this also means there may be no security-related fixes there, need to
# move the version to the next manually.
# jetbrains/runtime:jbr17env_aarch64
FROM arm64v8/centos:7
# Install the necessary build tools
RUN yum -y update; \
yum -y install centos-release-scl; \
yum -y install devtoolset-10-10.1-0.el7; \
yum -y install \
alsa-lib-devel-1.1.8-1.el7.aarch64 \
autoconf-2.69-11.el7.noarch \
automake-1.13.4-3.el7.noarch \
bzip2-1.0.6-13.el7.aarch64 \
cups-devel-1.6.3-51.el7.aarch64 \
file-5.11-37.el7.aarch64 \
fontconfig-devel-2.13.0-4.3.el7.aarch64 \
freetype-devel-2.8-14.el7_9.1.aarch64 \
giflib-devel-4.1.6-9.el7.aarch64 \
git-1.8.3.1-24.el7_9.aarch64 \
libtool-2.4.2-22.el7_3.aarch64 \
libXi-devel-1.7.9-1.el7.aarch64 \
libXrandr-devel-1.5.1-2.el7.aarch64 \
libXrender-devel-0.9.10-1.el7.aarch64 \
libXt-devel-1.1.5-3.el7.aarch64 \
libXtst-devel-1.2.3-1.el7.aarch64 \
make-3.82-24.el7.aarch64 \
rsync-3.1.2-12.el7_9.aarch64 \
tar-1.26-35.el7.aarch64 \
unzip-6.0-24.el7_9.aarch64 \
wayland-devel-1.15.0-1.el7 \
zip-3.0-11.el7.aarch64; \
yum -y clean all
ENV PATH="/opt/rh/devtoolset-10/root/usr/bin:${PATH}"
ENV LD_LIBRARY_PATH="/opt/rh/devtoolset-10/root/usr/lib64:/opt/rh/devtoolset-10/root/usr/lib:/opt/rh/devtoolset-10/root/usr/lib64/dyninst:/opt/rh/devtoolset-10/root/usr/lib/dyninst:/opt/rh/devtoolset-10/root/usr/lib64:/opt/rh/devtoolset-10/root/usr/lib"
ENV PKG_CONFIG_PATH="/opt/rh/devtoolset-10/root/usr/lib64/pkgconfig"
RUN git config --global user.email "teamcity@jetbrains.com" && \
git config --global user.name "builduser"

View File

@@ -0,0 +1,43 @@
# NOTE: This Dockerfile is meant to be used from the mkdocker_musl_aarch64.sh script.
# Pull a concrete version of Linux that does NOT recieve updates after it's
# been created. This is so that the image is as stable as possible to make
# image creation reproducible.
# NB: this also means there may be no security-related fixes there, need to
# move the version to the next manually.
FROM arm64v8/alpine:3.12
# Install the necessary build tools
RUN apk --no-cache add --update \
alsa-lib-dev=1.2.2-r0 \
autoconf=2.69-r2 \
bash=5.0.17-r0 \
build-base=0.5-r2 \
bzip2=1.0.8-r1 \
cups-dev=2.3.3-r0 \
file=5.38-r0 \
fontconfig=2.13.1-r2 \
fontconfig-dev=2.13.1-r2 \
freetype-dev=2.10.4-r2 \
git=2.26.3-r1 \
grep=3.4-r0 \
libx11-dev=1.6.12-r1 \
libxext-dev=1.3.4-r0 \
libxrandr-dev=1.5.2-r0 \
libxrender-dev=0.9.10-r3 \
libxt-dev=1.2.0-r0 \
libxtst-dev=1.2.3-r3 \
linux-headers=5.4.5-r1 \
rsync=3.1.3-r3 \
tar=1.32-r2 \
wayland-dev=1.18.0-r4 \
zip=3.0-r8
# Set up boot JDK for building
COPY boot_jdk_musl_aarch64.tar.gz /jdk20/
RUN cd /jdk20 && tar --strip-components=1 -xzf boot_jdk_musl_aarch64.tar.gz && rm /jdk20/boot_jdk_musl_aarch64.tar.gz
ENV BOOT_JDK=/jdk20
RUN git config --global user.email "teamcity@jetbrains.com" && \
git config --global user.name "builduser"

View File

@@ -1,4 +1,4 @@
# NOTE: This Dockerfile is meant to be used from the mkdocker_musl_<arch>.sh script.
# NOTE: This Dockerfile is meant to be used from the mkdocker_musl_x64.sh script.
# Pull a concrete version of Linux that does NOT recieve updates after it's
# been created. This is so that the image is as stable as possible to make
@@ -31,11 +31,12 @@ RUN apk --no-cache add --update \
rsync=3.2.5-r0 \
tar=1.34-r1 \
wayland-dev=1.19.0-r0 \
zip=3.0-r9 \
vulkan-headers=1.2.170-r0 \
vulkan-loader-dev=1.2.170-r1 \
glslang=8.13.3743-r1
zip=3.0-r9
# Set up boot JDK for building
COPY boot_jdk_musl_amd64.tar.gz /jdk20/
RUN cd /jdk20 && tar --strip-components=1 -xzf boot_jdk_musl_amd64.tar.gz && rm /jdk20/boot_jdk_musl_amd64.tar.gz
ENV BOOT_JDK=/jdk20
RUN git config --global user.email "teamcity@jetbrains.com" && \
git config --global user.name "builduser" && \
git config --global --add safe.directory '*'
git config --global user.name "builduser"

View File

@@ -1,57 +0,0 @@
# NOTE: This Dockerfile is meant to be used from the mkdocker_aarch64.sh script.
# Pull a concrete version of Linux that does NOT recieve updates after it's
# been created. This is so that the image is as stable as possible to make
# image creation reproducible.
# NB: this also means there may be no security-related fixes there, need to
# move the version to the next manually.
FROM oraclelinux:7
ARG profilename username password csi
RUN /usr/sbin/ulnreg_ks --profilename=$profilename \
--username=$username \
--password=$password \
--csi=$csi
COPY scl.repo /etc/yum.repos.d/
# Install the necessary build tools
RUN yum -y update && \
yum -y install \
devtoolset-10-libstdc++-devel-10.2.1-11.2.0.2.el7 \
devtoolset-10-runtime-10.1-0.el7 \
devtoolset-10-binutils-2.35-5.el7.4 \
devtoolset-10-gcc-10.2.1-11.2.0.2.el7 \
devtoolset-10-gcc-c++-10.2.1-11.2.0.2.el7 && \
yum -y install \
alsa-lib-devel-1.1.8-1.el7 \
autoconf-2.69-11.el7 \
automake-1.13.4-3.el7 \
bzip2-libs-1.0.6-13.el7 \
cups-devel-1.6.3-52.el7_9 \
file-5.11-37.el7 \
fontconfig-devel-2.13.0-4.3.el7 \
freetype-devel-2.8-14.el7_9.1 \
git-1.8.3.1-25.el7_9 \
git-core-1.8.3.1-25.el7_9 \
libtool-2.4.2-22.el7_3 \
libXi-devel-1.7.9-1.el7 \
libXrandr-devel-1.5.1-2.el7 \
libXrender-devel-0.9.10-1.el7 \
libXt-devel-1.1.5-3.el7 \
libXtst-devel-1.2.3-1.el7 \
make-3.82-24.el7 \
rsync-3.1.2-12.el7_9 \
unzip-6.0-24.0.1.el7_9 \
zip-3.0-11.el7 \
wayland-devel-1.15.0-1.el7 && \
yum -y clean all
RUN git config --global user.email "teamcity@jetbrains.com" && \
git config --global user.name "builduser" && \
git config --global --add safe.directory '*'
ENV PATH="/opt/rh/devtoolset-10/root/usr/bin:${PATH}"
ENV LD_LIBRARY_PATH="/opt/rh/devtoolset-10/root/usr/lib64:/opt/rh/devtoolset-10/root/usr/lib:/opt/rh/devtoolset-10/root/usr/lib64/dyninst:/opt/rh/devtoolset-10/root/usr/lib/dyninst:/opt/rh/devtoolset-10/root/usr/lib64:/opt/rh/devtoolset-10/root/usr/lib"
ENV PKG_CONFIG_PATH="/opt/rh/devtoolset-10/root/usr/lib64/pkgconfig"

View File

@@ -1,57 +0,0 @@
# NOTE: This Dockerfile is meant to be used from the mkdocker_64.sh script.
# Pull a concrete version of Linux that does NOT recieve updates after it's
# been created. This is so that the image is as stable as possible to make
# image creation reproducible.
# NB: this also means there may be no security-related fixes there, need to
# move the version to the next manually.
FROM oraclelinux:7
ARG profilename username password csi
RUN /usr/sbin/ulnreg_ks --profilename=$profilename \
--username=$username \
--password=$password \
--csi=$csi
COPY scl.repo /etc/yum.repos.d/
# Install the necessary build tools
RUN yum -y update && \
yum -y install \
devtoolset-10-libstdc++-devel-10.2.1-11.2.0.1.el7 \
devtoolset-10-runtime-10.1-0.el7 \
devtoolset-10-binutils-2.35-5.el7.4 \
devtoolset-10-gcc-10.2.1-11.2.0.1.el7 \
devtoolset-10-gcc-c++-10.2.1-11.2.0.1.el7 && \
yum -y install \
alsa-lib-devel-1.1.8-1.el7 \
autoconf-2.69-11.el7 \
automake-1.13.4-3.el7 \
bzip2-libs-1.0.6-13.el7 \
cups-devel-1.6.3-52.el7_9 \
file-5.11-37.el7 \
fontconfig-devel-2.13.0-4.3.el7 \
freetype-devel-2.8-14.el7_9.1 \
git-1.8.3.1-25.el7_9 \
git-core-1.8.3.1-25.el7_9 \
libtool-2.4.2-22.el7_3 \
libXi-devel-1.7.9-1.el7 \
libXrandr-devel-1.5.1-2.el7 \
libXrender-devel-0.9.10-1.el7 \
libXt-devel-1.1.5-3.el7 \
libXtst-devel-1.2.3-1.el7 \
make-3.82-24.el7 \
rsync-3.1.2-12.el7_9 \
unzip-6.0-24.0.1.el7_9 \
zip-3.0-11.el7 \
wayland-devel-1.15.0-1.el7 && \
yum -y clean all
RUN git config --global user.email "teamcity@jetbrains.com" && \
git config --global user.name "builduser" && \
git config --global --add safe.directory '*'
ENV PATH="/opt/rh/devtoolset-10/root/usr/bin:${PATH}"
ENV LD_LIBRARY_PATH="/opt/rh/devtoolset-10/root/usr/lib64:/opt/rh/devtoolset-10/root/usr/lib:/opt/rh/devtoolset-10/root/usr/lib64/dyninst:/opt/rh/devtoolset-10/root/usr/lib/dyninst:/opt/rh/devtoolset-10/root/usr/lib64:/opt/rh/devtoolset-10/root/usr/lib"
ENV PKG_CONFIG_PATH="/opt/rh/devtoolset-10/root/usr/lib64/pkgconfig"

View File

@@ -5,6 +5,8 @@
# image creation reproducible.
# NB: this also means there may be no security-related fixes there, need to
# move the version to the next manually.
#FROM i386/ubuntu:xenial
#FROM i386/ubuntu:bionic
FROM i386/ubuntu:focal
RUN linux32 \
@@ -28,6 +30,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \
libxt-dev \
libcups2-dev \
libasound2-data \
# libpng12-0 \
libasound2 \
libfreetype6 \
libfontconfig1-dev \
@@ -43,5 +46,10 @@ RUN linux32 \
apt-get clean -qy && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Set up boot JDK for building
COPY boot_jdk_x86.tar.gz /jdk17/
RUN cd /jdk17 && tar --strip-components=1 -xzf boot_jdk_x86.tar.gz && rm /jdk17/boot_jdk_x86.tar.gz
ENV BOOT_JDK=/jdk17
RUN git config --global user.email "teamcity@jetbrains.com" && \
git config --global user.name "builduser"

View File

@@ -0,0 +1,73 @@
# jetbrains/runtime:jbr17env_x86_64
FROM centos:7
RUN yum -y install centos-release-scl; \
yum -y install devtoolset-10-10.1-0.el7; \
yum -y install \
alsa-lib-devel-1.1.8-1.el7 \
autoconf-2.69-11.el7 \
automake-1.13.4-3.el7 \
bzip2-1.0.6-13.el7 \
cups-devel-1.6.3-51.el7 \
file-5.11-37.el7 \
fontconfig-devel-2.13.0-4.3.el7 \
freetype-devel-2.8-14.el7_9.1 \
giflib-devel-4.1.6-9.el7 \
git-1.8.3.1-24.el7_9 \
libtool-2.4.2-22.el7_3 \
libXi-devel-1.7.9-1.el7 \
libXrandr-devel-1.5.1-2.el7 \
libXrender-devel-0.9.10-1.el7 \
libXt-devel-1.1.5-3.el7 \
libXtst-devel-1.2.3-1.el7 \
make-3.82-24.el7 \
tar-1.26-35.el7 \
unzip-6.0-24.el7_9 \
wayland-devel-1.15.0-1.el7 \
wget-1.14-18.el7_6.1 \
which-2.20-7.el7 \
zip-3.0-11.el7 \
python3-3.6.8-17.el7
RUN mkdir .git && \
git config user.email "teamcity@jetbrains.com" && \
git config user.name "builduser"
ENV LD_LIBRARY_PATH="/opt/rh/devtoolset-10/root/usr/lib64:/opt/rh/devtoolset-10/root/usr/lib:/opt/rh/devtoolset-10/root/usr/lib64/dyninst:/opt/rh/devtoolset-10/root/usr/lib/dyninst:/opt/rh/devtoolset-10/root/usr/lib64:/opt/rh/devtoolset-10/root/usr/lib"
ENV PATH="/opt/rh/devtoolset-10/root/usr/bin::${PATH}"
ENV PKG_CONFIG_PATH="/opt/rh/devtoolset-10/root/usr/lib64/pkgconfig"
# Build GLSLC
RUN curl -OL https://github.com/Kitware/CMake/releases/download/v3.27.5/cmake-3.27.5-linux-x86_64.tar.gz \
&& echo 138c68addae825b16ed78d792dafef5e0960194833f48bd77e7e0429c6bc081c *cmake-3.27.5-linux-x86_64.tar.gz | sha256sum -c - \
&& tar -xzf cmake-3.27.5-linux-x86_64.tar.gz \
&& rm cmake-3.27.5-linux-x86_64.tar.gz \
&& git clone https://github.com/google/shaderc --branch v2023.6 \
&& cd shaderc \
&& ./utils/git-sync-deps \
&& mkdir build \
&& cd build \
&& /cmake-3.27.5-linux-x86_64/bin/cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DSHADERC_SKIP_TESTS=ON \
-DSHADERC_SKIP_EXAMPLES=ON \
-DSHADERC_SKIP_COPYRIGHT_CHECK=ON \
.. \
&& make install
ENV PATH="/cmake-3.27.5-linux-x86_64/bin::${PATH}"
# Checkout Vulkan headers
RUN mkdir /vulkan \
&& cd /vulkan \
&& git init \
&& git remote add -f origin https://github.com/KhronosGroup/Vulkan-Headers.git \
&& git fetch origin \
&& git checkout v1.3.265 -- include \
&& rm -r .git \
&& mkdir /vulkan_hpp \
&& cd /vulkan_hpp \
&& git init \
&& git remote add -f origin https://github.com/KhronosGroup/Vulkan-Hpp.git \
&& git fetch origin \
&& git checkout v1.3.265 -- vulkan \
&& rm -r .git

View File

@@ -1,27 +1,28 @@
#!/bin/bash
set -euo pipefail
set -x
# This script creates a Docker image suitable for building AArch64 variant
# of the JetBrains Runtime "dev" version.
echo "ULN username:"
read username
BOOT_JDK_REMOTE_FILE=zulu17.30.15-ca-jdk17.0.1-linux_aarch64.tar.gz
BOOT_JDK_SHA=4d9c9116eb0cdd2d7fb220d6d27059f4bf1b7e95cc93d5512bd8ce3791af86c7
BOOT_JDK_LOCAL_FILE=boot_jdk.tar.gz
echo "ULN password:"
read -s password
if [ ! -f $BOOT_JDK_LOCAL_FILE ]; then
# Obtain "boot JDK" from outside of the container.
wget -nc https://cdn.azul.com/zulu/bin/${BOOT_JDK_REMOTE_FILE} -O $BOOT_JDK_LOCAL_FILE
else
echo "boot JDK \"$BOOT_JDK_LOCAL_FILE\" present, skipping download"
fi
echo "CSI:"
read csi
# Verify that what we've downloaded can be trusted.
sha256sum -c - <<EOF
$BOOT_JDK_SHA *$BOOT_JDK_LOCAL_FILE
EOF
docker build \
--platform=linux/aarch64 \
--no-cache \
-t registry.jetbrains.team/p/jbre/containers/oraclelinux7_aarch64:latest \
--build-arg profilename=OL7_aarch64 \
--build-arg username=$username \
--build-arg password=$password \
--build-arg csi=$csi \
-f Dockerfile.oraclelinux.aarch64 .
docker build -t jbrdevenv_arm64v8 -f Dockerfile.aarch64 .
# NB: the resulting container can (and should) be used without the network
# connection (--network none) during build in order to reduce the chance

View File

@@ -1,14 +1,28 @@
#!/bin/bash
set -euxo pipefail
set -euo pipefail
set -x
# This script creates a Docker image suitable for building musl AArch64 variant
# of the JetBrains Runtime version 21.
docker build \
--platform=linux/aarch64 \
--no-cache \
-t registry.jetbrains.team/p/jbre/containers/alpine14_aarch64:latest \
-f Dockerfile.alpine .
BOOT_JDK_REMOTE_FILE=zulu20.32.11-ca-jdk20.0.2-linux_musl_aarch64.tar.gz
BOOT_JDK_SHA=eec57cf744c2438f695221f041d4804de3033ad33b6dba769d3359813ba3f90d
BOOT_JDK_LOCAL_FILE=boot_jdk_musl_aarch64.tar.gz
if [ ! -f $BOOT_JDK_LOCAL_FILE ]; then
# Obtain "boot JDK" from outside of the container.
wget -nc https://cdn.azul.com/zulu/bin/${BOOT_JDK_REMOTE_FILE} -O $BOOT_JDK_LOCAL_FILE
else
echo "boot JDK \"$BOOT_JDK_LOCAL_FILE\" present, skipping download"
fi
# Verify that what we've downloaded can be trusted.
sha256sum -c - <<EOF
$BOOT_JDK_SHA *$BOOT_JDK_LOCAL_FILE
EOF
docker build -t jetbrains/runtime:jbr21env_musl_aarch64 -f Dockerfile.musl_aarch64 .
# NB: the resulting container can (and should) be used without the network
# connection (--network none) during build in order to reduce the chance

View File

@@ -1,14 +1,28 @@
#!/bin/bash
set -euxo pipefail
set -euo pipefail
set -x
# This script creates a Docker image suitable for building musl x64 variant
# This script creates a Docker image suitable for building musl-x64 variant
# of the JetBrains Runtime version 21.
docker build \
--platform=linux/amd64 \
--no-cache \
-t registry.jetbrains.team/p/jbre/containers/alpine14_x64:latest \
-f Dockerfile.alpine .
BOOT_JDK_REMOTE_FILE=zulu20.32.11-ca-jdk20.0.2-linux_musl_x64.tar.gz
BOOT_JDK_SHA=fca5081dd6da847fcd06f5b755e58edae22d6784f21b81bf73da2b538f842c07
BOOT_JDK_LOCAL_FILE=boot_jdk_musl_amd64.tar.gz
if [ ! -f $BOOT_JDK_LOCAL_FILE ]; then
# Obtain "boot JDK" from outside of the container.
wget -nc https://cdn.azul.com/zulu/bin/${BOOT_JDK_REMOTE_FILE} -O $BOOT_JDK_LOCAL_FILE
else
echo "boot JDK \"$BOOT_JDK_LOCAL_FILE\" present, skipping download"
fi
# Verify that what we've downloaded can be trusted.
sha256sum -c - <<EOF
$BOOT_JDK_SHA *$BOOT_JDK_LOCAL_FILE
EOF
docker build -t jetbrains/runtime:jbr21env_musl_x64 -f Dockerfile.musl_x64 .
# NB: the resulting container can (and should) be used without the network
# connection (--network none) during build in order to reduce the chance

View File

@@ -1,28 +0,0 @@
#!/bin/bash
set -euo pipefail
# This script creates a Docker image suitable for building x64 variant
echo "ULN username:"
read username
echo "ULN password:"
read -s password
echo "CSI:"
read csi
docker build \
--platform=linux/amd64 \
--no-cache \
-t registry.jetbrains.team/p/jbre/containers/oraclelinux7_x64:latest \
--build-arg profilename=OL7_x64 \
--build-arg username=$username \
--build-arg password=$password \
--build-arg csi=$csi \
-f Dockerfile.oraclelinux.x86_64 .
# NB: the resulting container can (and should) be used without the network
# connection (--network none) during build in order to reduce the chance
# of build contamination.

View File

@@ -1,14 +1,25 @@
#!/bin/bash
set -euxo pipefail
#!/bin/bash -x
# This script creates a Docker image suitable for building x86 variant
# of the JetBrains Runtime version 17.
docker build \
--platform=linux/i386 \
--no-cache \
-t registry.jetbrains.team/p/jbre/containers/ubuntu2004_x86:latest \
-f Dockerfile.ubuntu.x86 .
BOOT_JDK_REMOTE_FILE=zulu17.34.19-ca-jdk17.0.3-linux_i686.tar.gz
BOOT_JDK_SHA=1c35c374ba0001e675d6e80819d5be900c4e141636d5e484992a8c550be14481
BOOT_JDK_LOCAL_FILE=boot_jdk_x86.tar.gz
if [ ! -f $BOOT_JDK_LOCAL_FILE ]; then
# Obtain "boot JDK" from outside of the container.
wget -nc https://cdn.azul.com/zulu/bin/${BOOT_JDK_REMOTE_FILE} -O $BOOT_JDK_LOCAL_FILE
else
echo "boot JDK \"$BOOT_JDK_LOCAL_FILE\" present, skipping download"
fi
# Verify that what we've downloaded can be trusted.
sha256sum -c - <<EOF
$BOOT_JDK_SHA *$BOOT_JDK_LOCAL_FILE
EOF
docker build -t jetbrains/runtime:jbr17env_x86 -f Dockerfile.x86 .
# NB: the resulting container can (and should) be used without the network
# connection (--network none) during build in order to reduce the chance

View File

@@ -1,6 +0,0 @@
[ol7_scl]
name=Oracle Linux $releasever Update 8 ($basearch) Software Collection
baseurl=https://yum$ociregion.$ocidomain/repo/OracleLinux/OL7/SoftwareCollections/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1

View File

@@ -102,12 +102,6 @@ else
WITH_BUNDLED_FREETYPE=""
fi
if [ "$bundle_type" == "vk" ]; then
WITH_VULKAN="--with-vulkan"
else
WITH_VULKAN=""
fi
REPRODUCIBLE_BUILD_OPTS="--with-source-date=$SOURCE_DATE_EPOCH
--with-hotspot-build-time=$BUILD_TIME
--with-copyright-year=$COPYRIGHT_YEAR

View File

@@ -35,7 +35,6 @@ function do_configure {
--with-version-opt=b"$build_number" \
--with-boot-jdk="$BOOT_JDK" \
--enable-cds=yes \
$WITH_VULKAN \
$DISABLE_WARNINGS_AS_ERRORS \
$STATIC_CONF_ARGS \
$REPRODUCIBLE_BUILD_OPTS \
@@ -64,7 +63,7 @@ function create_image_bundle {
__cds_opt=''
if is_musl; then libc_type_suffix='musl-' ; fi
__cds_opt="--generate-cds-archive"
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then __cds_opt="--generate-cds-archive"; fi
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
JBR=${__bundle_name}-${JBSDK_VERSION}-linux-${libc_type_suffix}aarch64-${fastdebug_infix}b${build_number}
@@ -113,11 +112,6 @@ case "$bundle_type" in
jbr_name_postfix="_${bundle_type}"
do_maketest=1
;;
"vk")
do_reset_changes=1
jbr_name_postfix="_${bundle_type}"
do_maketest=1
;;
"nomod" | "")
bundle_type=""
;;
@@ -146,7 +140,7 @@ JBRSDK_BUNDLE=jbrsdk
echo Fixing permissions
chmod -R a+r $JSDK
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "vk" ] || [ "$bundle_type" == "fd" ]; then
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
git apply -p0 < jb/project/tools/patches/add_jcef_module_aarch64.patch || do_exit $?
update_jsdk_mods $JSDK $JCEF_PATH/jmods $JSDK/jmods $JSDK_MODS_DIR || do_exit $?
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
@@ -159,7 +153,7 @@ create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" ||
# create sdk image bundle
modules=$(cat $JSDK/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "vk" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
fi
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" $JBRSDK_BUNDLE $JSDK_MODS_DIR "$modules" || do_exit $?

View File

@@ -42,7 +42,6 @@ function do_configure {
--with-version-opt=b"$build_number" \
--with-boot-jdk="$BOOT_JDK" \
--enable-cds=yes \
$WITH_VULKAN \
$LINUX_TARGET \
$DISABLE_WARNINGS_AS_ERRORS \
$STATIC_CONF_ARGS \
@@ -72,7 +71,7 @@ function create_image_bundle {
__cds_opt=''
if is_musl; then libc_type_suffix='musl-' ; fi
__cds_opt="--generate-cds-archive"
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then __cds_opt="--generate-cds-archive"; fi
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
JBR=${__bundle_name}-${JBSDK_VERSION}-linux-${libc_type_suffix}x64-${fastdebug_infix}b${build_number}
@@ -121,11 +120,6 @@ case "$bundle_type" in
jbr_name_postfix="_${bundle_type}"
do_maketest=1
;;
"vk")
do_reset_changes=1
jbr_name_postfix="_${bundle_type}"
do_maketest=1
;;
"nomod" | "")
bundle_type=""
;;
@@ -154,7 +148,7 @@ JBRSDK_BUNDLE=jbrsdk
echo Fixing permissions
chmod -R a+r $JSDK
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "vk" ] || [ "$bundle_type" == "fd" ]; then
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
update_jsdk_mods $JSDK $JCEF_PATH/jmods $JSDK/jmods $JSDK_MODS_DIR || do_exit $?
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
@@ -167,7 +161,7 @@ create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" ||
# create sdk image bundle
modules=$(cat $JSDK/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "vk" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
fi
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" $JBRSDK_BUNDLE $JSDK_MODS_DIR "$modules" || do_exit $?

View File

@@ -51,7 +51,7 @@ function create_image_bundle {
__cds_opt=''
if is_musl; then libc_type_suffix='musl-' ; fi
__cds_opt="--generate-cds-archive"
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then __cds_opt="--generate-cds-archive"; fi
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
JBR=${__bundle_name}-${JBSDK_VERSION}-linux-${libc_type_suffix}x86-${fastdebug_infix}b${build_number}
@@ -92,7 +92,7 @@ WITH_DEBUG_LEVEL="--with-debug-level=release"
RELEASE_NAME=linux-x86-server-release
case "$bundle_type" in
"jcef" | "vk")
"jcef")
echo "not implemented" && do_exit 1
;;
"nomod" | "")
@@ -119,7 +119,7 @@ JBRSDK_BUNDLE=jbrsdk
echo Fixing permissions
chmod -R a+r $JSDK
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "vk" ]; then
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
jbr_name_postfix="_${bundle_type}"
else
jbr_name_postfix=""

View File

@@ -34,23 +34,7 @@ else
contentType=$(jetSignContentType "$pathToBeSigned")
(
cd "$workDir" || exit 1
max_attempts=3
attempt=1
while [ $attempt -le $max_attempts ]; do
if "$JETSIGN_CLIENT" -log-format text -max-wait 1m -denoted-content-type "$contentType" -extensions "$jetSignExtensions" "$pathToBeSigned"; then
break
else
if [ $attempt -eq $max_attempts ]; then
echo "Failed to sign after $max_attempts attempts"
exit 1
fi
echo "Attempt $attempt failed, retrying in 5 seconds..."
sleep 5
((attempt++))
fi
done
"$JETSIGN_CLIENT" -log-format text -denoted-content-type "$contentType" -extensions "$jetSignExtensions" "$pathToBeSigned"
# SRE-1223 (Codesign removes execute bits in executable files) workaround
chmod "$(stat -f %A "$pathToBeSigned")" "$pathSigned"
if isMacOsBinary "$pathSigned"; then

View File

@@ -7,7 +7,7 @@
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<false/>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.cs.disable-executable-page-protection</key>

View File

@@ -53,7 +53,7 @@ function create_image_bundle {
fastdebug_infix=''
__cds_opt=''
__cds_opt="--generate-cds-archive"
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then __cds_opt="--generate-cds-archive"; fi
tmp=.bundle.$$.tmp
mkdir "$tmp" || do_exit $?

View File

@@ -30,34 +30,11 @@ trap "rm -f \"$PWD/tmp_key\"" INT EXIT RETURN
echo -n "${APPLE_PRIVATE_KEY}" > tmp_key
log "Notarizing $APP_PATH..."
xcrun notarytool submit --key tmp_key --key-id "${APPLE_KEY_ID}" --issuer "${APPLE_ISSUER_ID}" "$APP_PATH" 2>&1 --wait| tee "notarytool.submit.out"
xcrun notarytool submit --key tmp_key --key-id "${APPLE_KEY_ID}" --issuer "${APPLE_ISSUER_ID}" "$APP_PATH" 2>&1 | tee "notarytool.submit.out"
REQUEST_ID="$(grep -e " id: " "notarytool.submit.out" | grep -oE '([0-9a-f-]{36})'| head -n1)"
waitOutput=$(xcrun notarytool wait "$REQUEST_ID" --key tmp_key --key-id "${APPLE_KEY_ID}" --issuer "${APPLE_ISSUER_ID}" --timeout 6h)
if [ $? -ne 0 ]; then
log "Notarizing failed (wait command)"
echo "$waitOutput"
exit 1
else
echo "$waitOutput"
fi
logOutout=$(xcrun notarytool log "$REQUEST_ID" --key tmp_key --key-id "${APPLE_KEY_ID}" --issuer "${APPLE_ISSUER_ID}" developer_log.json)
if [ $? -ne 0 ]; then
log "Notarizing failed (log command)"
echo "$logOutout"
exit 1
else
echo "$logOutout"
fi
infoOUtput=$(xcrun notarytool info "$REQUEST_ID" --key tmp_key --key-id "${APPLE_KEY_ID}" --issuer "${APPLE_ISSUER_ID}")
if [ $? -ne 0 ]; then
log "Notarizing failed (info command)"
echo "$infoOUtput"
exit 1
else
echo "$infoOUtput"
fi
xcrun notarytool wait "$REQUEST_ID" --key tmp_key --key-id "${APPLE_KEY_ID}" --issuer "${APPLE_ISSUER_ID}" --timeout 6h ||:
xcrun notarytool log "$REQUEST_ID" --key tmp_key --key-id "${APPLE_KEY_ID}" --issuer "${APPLE_ISSUER_ID}" developer_log.json ||:
xcrun notarytool info "$REQUEST_ID" --key tmp_key --key-id "${APPLE_KEY_ID}" --issuer "${APPLE_ISSUER_ID}"
log "Notarizing finished"

View File

@@ -49,54 +49,12 @@ for f in \
if [ -d "$APPLICATION_PATH/$f" ]; then
find "$APPLICATION_PATH/$f" \
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -name "*.tbd" -o -name "*.node" -o -perm +111 \) \
-exec sh -c '"$1" --timestamp -v -s "$2" --options=runtime --force --entitlements "$3" "$4" || exit 1' sh "$SIGN_UTILITY" "$JB_DEVELOPER_CERT" "$SCRIPT_DIR/entitlements.xml" {} \;
-exec "$SIGN_UTILITY" --timestamp \
-v -s "$JB_DEVELOPER_CERT" --options=runtime --force \
--entitlements "$SCRIPT_DIR/entitlements.xml" {} \;
fi
done
log "Signing jmod files"
JMODS_DIR="$APPLICATION_PATH/Contents/Home/jmods"
JMOD_EXE="$APPLICATION_PATH/Contents/Home/bin/jmod"
if [ -d "$JMODS_DIR" ]; then
for jmod_file in "$JMODS_DIR"/*.jmod; do
log "Processing $jmod_file"
TMP_DIR="$JMODS_DIR/tmp"
rm -rf "$TMP_DIR"
mkdir "$TMP_DIR"
log "Unzipping $jmod_file"
$JMOD_EXE extract --dir "$TMP_DIR" "$jmod_file" >/dev/null
log "Removing $jmod_file"
rm -f "$jmod_file"
log "Signing dylibs in $TMP_DIR"
find "$TMP_DIR" \
-type f \( -name "*.dylib" -o -name "*.so" -o -perm +111 -o -name jarsigner -o -name jdeps -o -name jpackageapplauncher -o -name jspawnhelper -o -name jar -o -name javap -o -name jdeprscan -o -name jfr -o -name rmiregistry -o -name java -o -name jhsdb -o -name jstatd -o -name jstatd -o -name jpackage -o -name keytool -o -name jmod -o -name jlink -o -name jimage -o -name jstack -o -name jcmd -o -name jps -o -name jmap -o -name jstat -o -name jinfo -o -name jshell -o -name jwebserver -o -name javac -o -name serialver -o -name jrunscript -o -name jdb -o -name jconsole -o -name javadoc \) \
-exec sh -c '"$1" --timestamp -v -s "$2" --options=runtime --force --entitlements "$3" "$4" || exit 1' sh "$SIGN_UTILITY" "$JB_DEVELOPER_CERT" "$SCRIPT_DIR/entitlements.xml" {} \;
cmd="$JMOD_EXE create --class-path $TMP_DIR/classes"
# Check each directory and add to the command if it exists
[ -d "$TMP_DIR/bin" ] && cmd="$cmd --cmds $TMP_DIR/bin"
[ -d "$TMP_DIR/conf" ] && cmd="$cmd --config $TMP_DIR/conf"
[ -d "$TMP_DIR/lib" ] && cmd="$cmd --libs $TMP_DIR/lib"
[ -d "$TMP_DIR/include" ] && cmd="$cmd --header-files $TMP_DIR/include"
[ -d "$TMP_DIR/legal" ] && cmd="$cmd --legal-notices $TMP_DIR/legal"
[ -d "$TMP_DIR/man" ] && cmd="$cmd --man-pages $TMP_DIR/man"
# Add the output file
cmd="$cmd $jmod_file"
# Execute the command
eval $cmd
log "Removing $TMP_DIR"
rm -rf "$TMP_DIR"
done
else
echo "Directory '$JMODS_DIR' does not exist. Skipping signing of jmod files."
fi
log "Signing libraries in jars in $APPLICATION_PATH"
# todo: add set -euo pipefail; into the inner sh -c
@@ -115,7 +73,10 @@ find "$APPLICATION_PATH" -name '*.jar' \
find jarfolder \
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -name "*.tbd" -o -name "jattach" \) \
-exec sh -c '"$1" --timestamp --force -v -s "$2" --options=runtime --entitlements "$3" "$4" || exit 1' sh "$SIGN_UTILITY" "$JB_DEVELOPER_CERT" "$SCRIPT_DIR/entitlements.xml" {} \;
-exec "$SIGN_UTILITY" --timestamp \
--force \
-v -s "$JB_DEVELOPER_CERT" --options=runtime \
--entitlements "$SCRIPT_DIR/entitlements.xml" {} \;
(cd jarfolder; zip -q -r -o -0 ../jar.jar .)
mv jar.jar "$file"
@@ -130,7 +91,9 @@ for f in \
if [ -d "$APPLICATION_PATH/$f" ]; then
find "$APPLICATION_PATH/$f" \
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -name "*.tbd" -o -perm +111 \) \
-exec sh -c '"$1" --timestamp -v -s "$2" --options=runtime --force --entitlements "$3" "$4" || exit 1' sh "$SIGN_UTILITY" "$JB_DEVELOPER_CERT" "$SCRIPT_DIR/entitlements.xml" {} \;
-exec "$SIGN_UTILITY" --timestamp \
-v -s "$JB_DEVELOPER_CERT" --options=runtime --force \
--entitlements "$SCRIPT_DIR/entitlements.xml" {} \;
fi
done
@@ -146,7 +109,7 @@ if [ "$JB_SIGN" = true ]; then for f in \
"$SIGN_UTILITY" --timestamp \
-v -s "$JB_DEVELOPER_CERT" --options=runtime \
--force \
--entitlements "$SCRIPT_DIR/entitlements.xml" tmp-to-sign.tar.gz || exit 1
--entitlements "$SCRIPT_DIR/entitlements.xml" tmp-to-sign.tar.gz
rm -rf "$line"
tar -xzf tmp-to-sign.tar.gz --directory "$(dirname "$line")"
rm -f tmp-to-sign.tar.gz
@@ -172,7 +135,7 @@ if [ "$JB_SIGN" = true ]; then
"$SIGN_UTILITY" --timestamp \
-v -s "$JB_DEVELOPER_CERT" --options=runtime \
--force \
--entitlements "$SCRIPT_DIR/entitlements.xml" tmp-to-sign.tar.gz || exit 1
--entitlements "$SCRIPT_DIR/entitlements.xml" tmp-to-sign.tar.gz
rm -rf "$APPLICATION_PATH"
tar -xzf tmp-to-sign.tar.gz --directory "$(dirname "$APPLICATION_PATH")"
rm -f tmp-to-sign.tar.gz
@@ -180,7 +143,7 @@ else
"$SIGN_UTILITY" --timestamp \
-v -s "$JB_DEVELOPER_CERT" --options=runtime \
--force \
--entitlements "$SCRIPT_DIR/entitlements.xml" "$APPLICATION_PATH" || exit 1
--entitlements "$SCRIPT_DIR/entitlements.xml" "$APPLICATION_PATH"
fi
BUILD_NAME="$(basename "$APPLICATION_PATH")"

View File

@@ -38,6 +38,9 @@ BUILD_NAME="$(ls "$EXPLODED")"
#sed -i '' s/BNDL/APPL/ $EXPLODED/$BUILD_NAME/Contents/Info.plist
rm -f $EXPLODED/$BUILD_NAME/Contents/CodeResources
rm "$INPUT_FILE"
if test -d $EXPLODED/$BUILD_NAME/Contents/Home/jmods; then
mv $EXPLODED/$BUILD_NAME/Contents/Home/jmods $BACKUP_JMODS
fi
log "$INPUT_FILE extracted and removed"
@@ -105,37 +108,9 @@ set -e
if [ "$NOTARIZE" = "yes" ]; then
log "Notarizing..."
"$SCRIPT_DIR/notarize.sh" "$PKG_NAME"
log "Stapling..."
appStaplerOutput=$(xcrun stapler staple "$APPLICATION_PATH")
if [ $? -ne 0 ]; then
log "Stapling application failed"
echo "$appStaplerOutput"
exit 1
else
echo "$appStaplerOutput"
fi
log "Stapling package..."
pkgStaplerOutput=$(xcrun stapler staple "$PKG_NAME")
if [ $? -ne 0 ]; then
log "Stapling package failed"
echo "$pkgStaplerOutput"
exit 1
else
echo "$pkgStaplerOutput"
fi
# Verify stapling
log "Verifying stapling..."
if ! stapler validate "$APPLICATION_PATH"; then
log "Stapling verification failed for application"
exit 1
fi
if ! stapler validate "$PKG_NAME"; then
log "Stapling verification failed for package"
exit 1
fi
xcrun stapler staple "$APPLICATION_PATH" ||:
xcrun stapler staple "$PKG_NAME" ||:
else
log "Notarization disabled"
log "Stapling disabled"
@@ -143,6 +118,11 @@ fi
log "Zipping $BUILD_NAME to $INPUT_FILE ..."
(
#cd "$EXPLODED"
#ditto -c -k --sequesterRsrc --keepParent "$BUILD_NAME" "../$INPUT_FILE"
if test -d $BACKUP_JMODS/jmods; then
mv $BACKUP_JMODS/jmods $APPLICATION_PATH/Contents/Home
fi
if [[ "$APPLICATION_PATH" != "$EXPLODED/$BUILD_NAME" ]]; then
mv $APPLICATION_PATH $EXPLODED/$BUILD_NAME
else
@@ -153,4 +133,4 @@ log "Zipping $BUILD_NAME to $INPUT_FILE ..."
log "Finished zipping"
)
rm -rf "$EXPLODED"
log "Done"
log "Done"

View File

@@ -54,7 +54,7 @@ function create_image_bundle {
fastdebug_infix=''
__cds_opt=''
__cds_opt="--generate-cds-archive"
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then __cds_opt="--generate-cds-archive"; fi
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
__root_dir=${__bundle_name}-${JBSDK_VERSION}-windows-x64-${fastdebug_infix}b${build_number}

View File

@@ -50,7 +50,7 @@ function create_image_bundle {
fastdebug_infix=''
__cds_opt=''
__cds_opt="--generate-cds-archive"
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then __cds_opt="--generate-cds-archive"; fi
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
__root_dir=${__bundle_name}-${JBSDK_VERSION}-windows-x86-${fastdebug_infix}b${build_number}

View File

@@ -29,11 +29,8 @@ function pack_jbr {
__root_dir=${__bundle_name}-${JBSDK_VERSION}-windows-aarch64-${fastdebug_infix}b${build_number}
echo Creating $JBR.tar.gz ...
chmod -R ug+rwx,o+rx ${BASE_DIR}/$__root_dir
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR $__root_dir || do_exit $?
echo Creating $JBR.zip ...
/usr/bin/zip -r $JBR.zip $__root_dir || do_exit $?
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR $__root_dir || do_exit $?
}
[ "$bundle_type" == "nomod" ] && bundle_type=""

View File

@@ -31,9 +31,6 @@ function pack_jbr {
echo Creating $JBR.tar.gz ...
chmod -R ug+rwx,o+rx ${BASE_DIR}/$__root_dir
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR $__root_dir || do_exit $?
echo Creating $JBR.zip ...
/usr/bin/zip -r $JBR.zip $__root_dir || do_exit $?
}
[ "$bundle_type" == "nomod" ] && bundle_type=""

View File

@@ -27,9 +27,6 @@ function pack_jbr {
echo Creating $JBR.tar.gz ...
chmod -R ug+rwx,o+rx ${BASE_DIR}/$__root_dir
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR $__root_dir || do_exit $?
echo Creating $JBR.zip ...
/usr/bin/zip -r $JBR.zip $__root_dir || do_exit $?
}
[ "$bundle_type" == "nomod" ] && bundle_type=""

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -743,6 +743,8 @@ define SetupRunJtregTestBody
# we may end up with a lot of JVM's
$1_JTREG_MAX_RAM_PERCENTAGE := $$(shell $(AWK) 'BEGIN { print 25 / $$($1_JTREG_JOBS); }')
JTREG_TIMEOUT_FACTOR ?= 4
JTREG_VERBOSE ?= fail,error,summary
JTREG_RETAIN ?= fail,error
JTREG_TEST_THREAD_FACTORY ?=
@@ -830,24 +832,6 @@ define SetupRunJtregTestBody
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$($1_JTREG_PROBLEM_LIST))
endif
JTREG_ALL_OPTIONS := $$(JTREG_JAVA_OPTIONS) $$(JTREG_VM_OPTIONS)
JTREG_AUTO_PROBLEM_LISTS :=
JTREG_AUTO_TIMEOUT_FACTOR := 4
ifneq ($$(findstring -Xcomp, $$(JTREG_ALL_OPTIONS)), )
JTREG_AUTO_PROBLEM_LISTS += ProblemList-Xcomp.txt
JTREG_AUTO_TIMEOUT_FACTOR := 10
endif
ifneq ($$(findstring -XX:+UseZGC, $$(JTREG_ALL_OPTIONS)), )
ifneq ($$(findstring -XX:-ZGenerational, $$(JTREG_ALL_OPTIONS)), )
JTREG_AUTO_PROBLEM_LISTS += ProblemList-zgc.txt
else
JTREG_AUTO_PROBLEM_LISTS += ProblemList-generational-zgc.txt
endif
endif
ifneq ($$(JTREG_EXTRA_PROBLEM_LISTS), )
# Accept both absolute paths as well as relative to the current test root.
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$(wildcard \
@@ -879,18 +863,6 @@ define SetupRunJtregTestBody
$$(eval $$(call SetupRunJtregTestCustom, $1))
# SetupRunJtregTestCustom might also adjust JTREG_AUTO_ variables
# so set the final results after setting values from custom setup
ifneq ($$(JTREG_AUTO_PROBLEM_LISTS), )
# Accept both absolute paths as well as relative to the current test root.
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$(wildcard \
$$(JTREG_AUTO_PROBLEM_LISTS) \
$$(addprefix $$($1_TEST_ROOT)/, $$(JTREG_AUTO_PROBLEM_LISTS)) \
))
endif
JTREG_TIMEOUT_FACTOR ?= $$(JTREG_AUTO_TIMEOUT_FACTOR)
clean-outputdirs-$1:
$$(RM) -r $$($1_TEST_SUPPORT_DIR)
$$(RM) -r $$($1_TEST_RESULTS_DIR)

View File

@@ -313,11 +313,9 @@ AC_OUTPUT
# After AC_OUTPUT, we need to do final work
CUSTOM_CONFIG_OUTPUT_GENERATED_HOOK
BASIC_POST_CONFIG_OUTPUT
# Finally output some useful information to the user
HELP_PRINT_SUMMARY_AND_WARNINGS
CUSTOM_SUMMARY_AND_WARNINGS_HOOK
HELP_REPEAT_WARNINGS
# All output is done. Do the post-config output management.
BASIC_POST_CONFIG_OUTPUT

View File

@@ -862,6 +862,15 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
$1_TOOLCHAIN_CFLAGS="${$1_GCC6_CFLAGS}"
$1_WARNING_CFLAGS_JVM="-Wno-format-zero-length -Wtype-limits -Wuninitialized"
elif test "x$TOOLCHAIN_TYPE" = xclang; then
NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_DELETE_NULL_POINTER_CHECKS_CFLAG],
PREFIX: $3,
IF_FALSE: [
NO_DELETE_NULL_POINTER_CHECKS_CFLAG=
]
)
$1_TOOLCHAIN_CFLAGS="${NO_DELETE_NULL_POINTER_CHECKS_CFLAG}"
fi
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
@@ -999,12 +1008,17 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
# $2 - Prefix for compiler variables (either BUILD_ or nothing).
AC_DEFUN([FLAGS_SETUP_GCC6_COMPILER_FLAGS],
[
# This flag is required for GCC 6 builds as undefined behavior in OpenJDK code
# runs afoul of the more aggressive versions of this optimization.
# These flags are required for GCC 6 builds as undefined behavior in OpenJDK code
# runs afoul of the more aggressive versions of these optimizations.
# Notably, value range propagation now assumes that the this pointer of C++
# member functions is non-null.
NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_DELETE_NULL_POINTER_CHECKS_CFLAG],
PREFIX: $2, IF_FALSE: [NO_DELETE_NULL_POINTER_CHECKS_CFLAG=""])
NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_LIFETIME_DSE_CFLAG],
PREFIX: $2, IF_FALSE: [NO_LIFETIME_DSE_CFLAG=""])
$1_GCC6_CFLAGS="${NO_LIFETIME_DSE_CFLAG}"
$1_GCC6_CFLAGS="${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
])
AC_DEFUN_ONCE([FLAGS_SETUP_BRANCH_PROTECTION],

View File

@@ -525,15 +525,9 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_LEAK_SANITIZER],
#
AC_DEFUN_ONCE([JDKOPT_SETUP_UNDEFINED_BEHAVIOR_SANITIZER],
[
UTIL_ARG_WITH(NAME: additional-ubsan-checks, TYPE: string,
DEFAULT: [],
DESC: [Customizes the ubsan checks],
OPTIONAL: true)
# GCC reports lots of likely false positives for stringop-truncation and format-overflow.
# Silence them for now.
UBSAN_CHECKS="-fsanitize=undefined -fsanitize=float-divide-by-zero -fno-sanitize=shift-base -fno-sanitize=alignment \
$ADDITIONAL_UBSAN_CHECKS"
UBSAN_CHECKS="-fsanitize=undefined -fsanitize=float-divide-by-zero -fno-sanitize=shift-base -fno-sanitize=alignment"
UBSAN_CFLAGS="$UBSAN_CHECKS -Wno-stringop-truncation -Wno-format-overflow -fno-omit-frame-pointer -DUNDEFINED_BEHAVIOR_SANITIZER"
UBSAN_LDFLAGS="$UBSAN_CHECKS"
UTIL_ARG_ENABLE(NAME: ubsan, DEFAULT: false, RESULT: UBSAN_ENABLED,

View File

@@ -70,25 +70,6 @@ AC_DEFUN_ONCE([LIB_SETUP_ALSA],
PKG_CHECK_MODULES(ALSA, alsa, [ALSA_FOUND=yes], [ALSA_FOUND=no])
fi
fi
if test "x$ALSA_FOUND" = xno; then
# If we have sysroot set, and no explicit library location is set,
# look at known locations in sysroot.
if test "x$SYSROOT" != "x" && test "x${with_alsa_lib}" == x; then
if test -f "$SYSROOT/usr/lib64/libasound.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
ALSA_LIBS="-L$SYSROOT/usr/lib64 -lasound"
ALSA_FOUND=yes
elif test -f "$SYSROOT/usr/lib/libasound.so"; then
ALSA_LIBS="-L$SYSROOT/usr/lib -lasound"
ALSA_FOUND=yes
elif test -f "$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI/libasound.so"; then
ALSA_LIBS="-L$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI -lasound"
ALSA_FOUND=yes
elif test -f "$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU_AUTOCONF-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI/libasound.so"; then
ALSA_LIBS="-L$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU_AUTOCONF-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI -lasound"
ALSA_FOUND=yes
fi
fi
fi
if test "x$ALSA_FOUND" = xno; then
AC_CHECK_HEADERS([alsa/asoundlib.h],
[

View File

@@ -71,9 +71,9 @@ AC_DEFUN_ONCE([LIB_SETUP_X11],
elif test -f "$SYSROOT/usr/lib/libX11.so"; then
x_libraries="$SYSROOT/usr/lib"
elif test -f "$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI/libX11.so"; then
x_libraries="$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI"
x_libraries="$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI/libX11.so"
elif test -f "$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU_AUTOCONF-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI/libX11.so"; then
x_libraries="$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU_AUTOCONF-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI"
x_libraries="$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU_AUTOCONF-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI/libX11.so"
fi
fi
fi

View File

@@ -33,6 +33,7 @@ m4_include([lib-freetype.m4])
m4_include([lib-hsdis.m4])
m4_include([lib-std.m4])
m4_include([lib-x11.m4])
m4_include([lib-fontconfig.m4])
m4_include([lib-speechd.m4])
m4_include([lib-nvdacontrollerclient.m4])
m4_include([lib-wayland.m4])
@@ -52,9 +53,8 @@ AC_DEFUN_ONCE([LIB_DETERMINE_DEPENDENCIES],
NEEDS_LIB_WAYLAND=false
SUPPORTS_LIB_VULKAN=false
elif test "x$ENABLE_HEADLESS_ONLY" = xtrue; then
# All other instances need X11, even if building headless only, libawt still
# needs X11 headers.
NEEDS_LIB_X11=true
# No X11 support needed when building headless only
NEEDS_LIB_X11=false
NEEDS_LIB_SPEECHD=false
NEEDS_LIB_WAYLAND=false
SUPPORTS_LIB_VULKAN=false

View File

@@ -449,11 +449,6 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_COMPILER_VERSION],
# Copyright (C) 2013 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions. There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# or look like
# gcc (GCC) 10.2.1 20200825 (Alibaba 10.2.1-3.8 2.32)
# Copyright (C) 2020 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions. There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
# Check that this is likely to be GCC.
$ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
@@ -467,8 +462,7 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_COMPILER_VERSION],
COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
$SED -e 's/ *Copyright .*//'`
COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
$AWK -F ')' '{print [$]2}' | \
$AWK '{print [$]1}'`
$SED -e 's/^.* \(@<:@1-9@:>@<:@0-9@:>@*\.@<:@0-9.@:>@*\)@<:@^0-9.@:>@.*$/\1/'`
elif test "x$TOOLCHAIN_TYPE" = xclang; then
# clang --version output typically looks like
# Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)

View File

@@ -215,21 +215,7 @@ DEPENDENCY_TARGET_SED_PATTERN := \
# The fix-deps-file macro is used to adjust the contents of the generated make
# dependency files to contain paths compatible with make.
#
REWRITE_PATHS_RELATIVE = false
ifeq ($(ALLOW_ABSOLUTE_PATHS_IN_OUTPUT)-$(FILE_MACRO_CFLAGS), false-)
REWRITE_PATHS_RELATIVE = true
endif
# CCACHE_BASEDIR needs fix-deps-file as makefiles use absolute filenames for
# object files while CCACHE_BASEDIR will make ccache relativize all paths for
# its compiler. The compiler then produces relative dependency files.
# make does not know a relative and absolute filename is the same so it will
# ignore such dependencies.
ifneq ($(CCACHE), )
REWRITE_PATHS_RELATIVE = true
endif
ifeq ($(REWRITE_PATHS_RELATIVE), true)
# Need to handle -I flags as both '-Ifoo' and '-I foo'.
MakeCommandRelative = \
$(CD) $(WORKSPACE_ROOT) && \

View File

@@ -28,12 +28,12 @@
DEFAULT_VERSION_FEATURE=21
DEFAULT_VERSION_INTERIM=0
DEFAULT_VERSION_UPDATE=6
DEFAULT_VERSION_UPDATE=4
DEFAULT_VERSION_PATCH=0
DEFAULT_VERSION_EXTRA1=0
DEFAULT_VERSION_EXTRA2=0
DEFAULT_VERSION_EXTRA3=0
DEFAULT_VERSION_DATE=2025-01-21
DEFAULT_VERSION_DATE=2024-07-16
DEFAULT_VERSION_CLASSFILE_MAJOR=65 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
DEFAULT_VERSION_CLASSFILE_MINOR=0
DEFAULT_VERSION_DOCS_API_SINCE=11

View File

@@ -708,7 +708,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic
<territory type="BS">𞤄𞤢𞤸𞤢𞤥𞤢𞥄𞤧</territory>
<territory type="BT">𞤄𞤵𞥅𞤼𞤢𞥄𞤲</territory>
<territory type="BV">𞤅𞤵𞤪𞤭𞥅𞤪𞤫 𞤄𞤵𞥅𞤾𞤫𞥅</territory>
<territory type="BW">𞤄𞤮𞤼𞤧𞤵𞤱𞤢𞥄𞤲𞤢</territory>
<territory type="BW">𞤄𞤮𞤼𞤧𞤵𞤱𞤢𞥄𞤲𞤢</territory>
<territory type="BY">𞤄𞤫𞤤𞤢𞤪𞤵𞥅𞤧</territory>
<territory type="BZ">𞤄𞤫𞤤𞤭𞥅𞥁</territory>
<territory type="CA">𞤑𞤢𞤲𞤢𞤣𞤢𞥄</territory>
@@ -8278,7 +8278,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic
<exemplarCity>𞤐𞤵𞥅𞤳</exemplarCity>
</zone>
<zone type="America/Scoresbysund">
<exemplarCity>𞤋𞤼𞥆𞤮𞤳𞤮𞤪𞤼𞤮𞥅𞤪𞤥𞤭𞥅𞤼</exemplarCity>
<exemplarCity>𞤋𞤼𞥆𞤮𞤳𞤮𞤪𞤼𞤮𞥅𞤪𞤥𞤭𞥅𞤼</exemplarCity>
</zone>
<zone type="America/Danmarkshavn">
<exemplarCity>𞤁𞤢𞥄𞤲𞤥𞤢𞤪𞤳𞥃𞤢𞥄𞤾𞤲</exemplarCity>

View File

@@ -44,7 +44,7 @@ rm -f *
fetchJar() {
url="${MAVEN_MIRROR}/$1/$2/$3/$2-$3.jar"
if command -v curl > /dev/null; then
curl -OL --fail $url
curl -O --fail $url
elif command -v wget > /dev/null; then
wget $url
else

View File

@@ -157,13 +157,8 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJVM, \
DISABLED_WARNINGS_gcc_ad_$(HOTSPOT_TARGET_CPU_ARCH).cpp := nonnull, \
DISABLED_WARNINGS_gcc_cgroupV1Subsystem_linux.cpp := address, \
DISABLED_WARNINGS_gcc_cgroupV2Subsystem_linux.cpp := address, \
DISABLED_WARNINGS_gcc_handshake.cpp := stringop-overflow, \
DISABLED_WARNINGS_gcc_interp_masm_x86.cpp := uninitialized, \
DISABLED_WARNINGS_gcc_jvmciCodeInstaller.cpp := stringop-overflow, \
DISABLED_WARNINGS_gcc_jvmtiTagMap.cpp := stringop-overflow, \
DISABLED_WARNINGS_gcc_postaloc.cpp := address, \
DISABLED_WARNINGS_gcc_shenandoahLock.cpp := stringop-overflow, \
DISABLED_WARNINGS_gcc_synchronizer.cpp := stringop-overflow, \
DISABLED_WARNINGS_clang := $(DISABLED_WARNINGS_clang), \
DISABLED_WARNINGS_clang_arguments.cpp := missing-field-initializers, \
DISABLED_WARNINGS_clang_codeBuffer.cpp := tautological-undefined-compare, \

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -273,7 +273,7 @@ public final class TzdbZoneRulesCompiler {
// link version-region-rules
out.writeShort(builtZones.size());
for (Map.Entry<String, ZoneRules> entry : builtZones.entrySet()) {
int regionIndex = findRegionIndex(regionArray, entry.getKey());
int regionIndex = Arrays.binarySearch(regionArray, entry.getKey());
int rulesIndex = rulesList.indexOf(entry.getValue());
out.writeShort(regionIndex);
out.writeShort(rulesIndex);
@@ -281,8 +281,8 @@ public final class TzdbZoneRulesCompiler {
// alias-region
out.writeShort(links.size());
for (Map.Entry<String, String> entry : links.entrySet()) {
int aliasIndex = findRegionIndex(regionArray, entry.getKey());
int regionIndex = findRegionIndex(regionArray, entry.getValue());
int aliasIndex = Arrays.binarySearch(regionArray, entry.getKey());
int regionIndex = Arrays.binarySearch(regionArray, entry.getValue());
out.writeShort(aliasIndex);
out.writeShort(regionIndex);
}
@@ -294,14 +294,6 @@ public final class TzdbZoneRulesCompiler {
}
}
private static int findRegionIndex(String[] regionArray, String region) {
int index = Arrays.binarySearch(regionArray, region);
if (index < 0) {
throw new IllegalArgumentException("Unknown region: " + region);
}
return index;
}
/** Whether to output verbose messages. */
private boolean verbose;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -164,8 +164,7 @@ class TzdbZoneRulesProvider {
}
continue;
}
int token0len = tokens.length > 0 ? tokens[0].length() : line.length();
if (line.regionMatches(true, 0, "Zone", 0, token0len)) { // parse Zone line
if (line.startsWith("Zone")) { // parse Zone line
String name = tokens[1];
if (excludedZones.contains(name)){
continue;
@@ -183,13 +182,13 @@ class TzdbZoneRulesProvider {
if (zLine.parse(tokens, 2)) {
openZone = null;
}
} else if (line.regionMatches(true, 0, "Rule", 0, token0len)) { // parse Rule line
} else if (line.startsWith("Rule")) { // parse Rule line
String name = tokens[1];
if (!rules.containsKey(name)) {
rules.put(name, new ArrayList<RuleLine>(10));
}
rules.get(name).add(new RuleLine().parse(tokens));
} else if (line.regionMatches(true, 0, "Link", 0, token0len)) { // parse link line
} else if (line.startsWith("Link")) { // parse link line
if (tokens.length >= 3) {
String realId = tokens[1];
String aliasId = tokens[2];
@@ -305,7 +304,7 @@ class TzdbZoneRulesProvider {
month = parseMonth(tokens[off++]);
if (off < tokens.length) {
String dayRule = tokens[off++];
if (dayRule.regionMatches(true, 0, "last", 0, 4)) {
if (dayRule.startsWith("last")) {
dayOfMonth = -1;
dayOfWeek = parseDayOfWeek(dayRule.substring(4));
adjustForwards = false;
@@ -356,45 +355,42 @@ class TzdbZoneRulesProvider {
}
int parseYear(String year, int defaultYear) {
int len = year.length();
if (year.regionMatches(true, 0, "minimum", 0, len)) return 1900;
if (year.regionMatches(true, 0, "maximum", 0, len)) return Year.MAX_VALUE;
if (year.regionMatches(true, 0, "only", 0, len)) return defaultYear;
switch (year.toLowerCase()) {
case "min": return 1900;
case "max": return Year.MAX_VALUE;
case "only": return defaultYear;
}
return Integer.parseInt(year);
}
Month parseMonth(String mon) {
int len = mon.length();
if (mon.regionMatches(true, 0, "January", 0, len)) return Month.JANUARY;
if (mon.regionMatches(true, 0, "February", 0, len)) return Month.FEBRUARY;
if (mon.regionMatches(true, 0, "March", 0, len)) return Month.MARCH;
if (mon.regionMatches(true, 0, "April", 0, len)) return Month.APRIL;
if (mon.regionMatches(true, 0, "May", 0, len)) return Month.MAY;
if (mon.regionMatches(true, 0, "June", 0, len)) return Month.JUNE;
if (mon.regionMatches(true, 0, "July", 0, len)) return Month.JULY;
if (mon.regionMatches(true, 0, "August", 0, len)) return Month.AUGUST;
if (mon.regionMatches(true, 0, "September", 0, len)) return Month.SEPTEMBER;
if (mon.regionMatches(true, 0, "October", 0, len)) return Month.OCTOBER;
if (mon.regionMatches(true, 0, "November", 0, len)) return Month.NOVEMBER;
if (mon.regionMatches(true, 0, "December", 0, len)) return Month.DECEMBER;
switch (mon) {
case "Jan": return Month.JANUARY;
case "Feb": return Month.FEBRUARY;
case "Mar": return Month.MARCH;
case "Apr": return Month.APRIL;
case "May": return Month.MAY;
case "Jun": return Month.JUNE;
case "Jul": return Month.JULY;
case "Aug": return Month.AUGUST;
case "Sep": return Month.SEPTEMBER;
case "Oct": return Month.OCTOBER;
case "Nov": return Month.NOVEMBER;
case "Dec": return Month.DECEMBER;
}
throw new IllegalArgumentException("Unknown month: " + mon);
}
DayOfWeek parseDayOfWeek(String dow) {
int len = dow.length();
if (dow.regionMatches(true, 0, "Monday", 0, len)) return DayOfWeek.MONDAY;
if (dow.regionMatches(true, 0, "Tuesday", 0, len)) return DayOfWeek.TUESDAY;
if (dow.regionMatches(true, 0, "Wednesday", 0, len)) return DayOfWeek.WEDNESDAY;
if (dow.regionMatches(true, 0, "Thursday", 0, len)) return DayOfWeek.THURSDAY;
if (dow.regionMatches(true, 0, "Friday", 0, len)) return DayOfWeek.FRIDAY;
if (dow.regionMatches(true, 0, "Saturday", 0, len)) return DayOfWeek.SATURDAY;
if (dow.regionMatches(true, 0, "Sunday", 0, len)) return DayOfWeek.SUNDAY;
switch (dow) {
case "Mon": return DayOfWeek.MONDAY;
case "Tue": return DayOfWeek.TUESDAY;
case "Wed": return DayOfWeek.WEDNESDAY;
case "Thu": return DayOfWeek.THURSDAY;
case "Fri": return DayOfWeek.FRIDAY;
case "Sat": return DayOfWeek.SATURDAY;
case "Sun": return DayOfWeek.SUNDAY;
}
throw new IllegalArgumentException("Unknown day-of-week: " + dow);
}

View File

@@ -62,7 +62,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJAVA, \
ProcessImpl_md.c_CFLAGS := $(VERSION_CFLAGS), \
WARNINGS_AS_ERRORS_xlc := false, \
DISABLED_WARNINGS_gcc_ProcessImpl_md.c := unused-result, \
DISABLED_WARNINGS_clang_jni_util.c := format-nonliteral, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_macosx := -L$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/, \

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -340,13 +340,6 @@ ifeq ($(call isTargetOs, windows macosx), false)
DISABLED_WARNINGS_gcc_XToolkit.c := unused-result, \
DISABLED_WARNINGS_gcc_XWindow.c := unused-function, \
DISABLED_WARNINGS_gcc_keycode_cache.c := unused-function, \
DISABLED_WARNINGS_clang_awt_Taskbar.c := parentheses, \
DISABLED_WARNINGS_clang_gtk2_interface.c := parentheses, \
DISABLED_WARNINGS_clang_gtk3_interface.c := parentheses, \
DISABLED_WARNINGS_clang_OGLBufImgOps.c := format-nonliteral, \
DISABLED_WARNINGS_clang_OGLPaints.c := format-nonliteral, \
DISABLED_WARNINGS_clang_screencast_pipewire.c := format-nonliteral, \
DISABLED_WARNINGS_clang_sun_awt_X11_GtkFileDialogPeer.c := parentheses, \
DISABLED_WARNINGS_clang_aix := deprecated-non-prototype, \
DISABLED_WARNINGS_clang_aix_awt_Taskbar.c := parentheses, \
DISABLED_WARNINGS_clang_aix_OGLPaints.c := format-nonliteral, \
@@ -398,7 +391,6 @@ ifeq ($(call isTargetOs, windows macosx), false)
common/awt/debug \
common/awt/systemscale \
common/font \
common/java2d \
common/java2d/wl \
common/java2d/vulkan \
common/wayland \
@@ -667,10 +659,7 @@ else
endif
# hb-ft.cc is not presently needed, and requires freetype 2.4.2 or later.
# hb-subset and hb-style APIs are not needed, excluded to cut on compilation time.
LIBFONTMANAGER_EXCLUDE_FILES += hb-ft.cc hb-subset-cff-common.cc \
hb-subset-cff1.cc hb-subset-cff2.cc hb-subset-input.cc hb-subset-plan.cc \
hb-subset.cc hb-subset-instancer-solver.cc gsubgpos-context.cc hb-style.cc
LIBFONTMANAGER_EXCLUDE_FILES += libharfbuzz/hb-ft.cc
# list of disabled warnings and the compilers for which it was specifically added.
# array-bounds -> GCC 12 on Alpine Linux
@@ -1095,7 +1084,6 @@ ifeq ($(call isTargetOs, macosx), true)
libawt_lwawt/java2d/metal \
include \
common/awt/debug \
common/java2d \
common/java2d/opengl \
libosxapp \
#

View File

@@ -33,7 +33,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJ2GSS, \
CFLAGS := $(CFLAGS_JDKLIB), \
DISABLED_WARNINGS_gcc := undef, \
DISABLED_WARNINGS_clang_aix := undef, \
DISABLED_WARNINGS_clang := undef, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := $(LIBDL), \

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -61,7 +61,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBSA, \
OPTIMIZATION := HIGH, \
DISABLED_WARNINGS_gcc := sign-compare, \
DISABLED_WARNINGS_gcc_ps_core.c := pointer-arith, \
DISABLED_WARNINGS_clang_ps_core.c := pointer-arith, \
DISABLED_WARNINGS_clang := sign-compare, \
DISABLED_WARNINGS_clang_libproc_impl.c := format-nonliteral, \
DISABLED_WARNINGS_clang_sadis.c := format-nonliteral, \

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -65,8 +65,6 @@ $(eval $(call SetupJdkExecutable, BUILD_JPACKAGE_APPLAUNCHEREXE, \
INCLUDE_FILES := $(JPACKAGE_APPLAUNCHER_INCLUDE_FILES), \
TOOLCHAIN := $(JPACKAGE_APPLAUNCHER_TOOLCHAIN), \
OPTIMIZATION := LOW, \
DISABLED_WARNINGS_clang_LinuxPackage.c := format-nonliteral, \
DISABLED_WARNINGS_clang_JvmLauncherLib.c := format-nonliteral, \
CXXFLAGS := $(call JpackageWithStaticCrt, $(CXXFLAGS_JDKEXE)) \
$(JPACKAGE_APPLAUNCHER_INCLUDES), \
CFLAGS := $(call JpackageWithStaticCrt, $(CFLAGS_JDKEXE)) \
@@ -105,8 +103,6 @@ ifeq ($(call isTargetOs, linux), true)
EXCLUDE_FILES := LinuxLauncher.c LinuxPackage.c, \
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
OPTIMIZATION := LOW, \
DISABLED_WARNINGS_clang_JvmLauncherLib.c := format-nonliteral, \
DISABLED_WARNINGS_clang_tstrings.cpp := format-nonliteral, \
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(JPACKAGE_LIBAPPLAUNCHER_INCLUDES), \
CFLAGS := $(CFLAGS_JDKLIB) $(JPACKAGE_LIBAPPLAUNCHER_INCLUDES), \
LDFLAGS := $(LDFLAGS_JDKLIB), \

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -44,7 +44,6 @@ endif
$(eval $(call SetupJdkLibrary, BUILD_LIBMANAGEMENT_EXT, \
NAME := management_ext, \
OPTIMIZATION := $(LIBMANAGEMENT_EXT_OPTIMIZATION), \
DISABLED_WARNINGS_clang_UnixOperatingSystem.c := format-nonliteral, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBMANAGEMENT_EXT_CFLAGS), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -660,7 +660,7 @@ public class GenerateJfrFiles {
out.write("");
out.write("union JfrNativeSettings {");
out.write(" // Array version.");
out.write(" jfrNativeEventSetting bits[NUMBER_OF_EVENTS + NUMBER_OF_RESERVED_EVENTS];");
out.write(" jfrNativeEventSetting bits[NUMBER_OF_EVENTS];");
out.write(" // Then, to make it easy to debug,");
out.write(" // add named struct members also.");
out.write(" struct {");

View File

@@ -80,10 +80,6 @@ IMAGES_TARGETS += $(COPY_FH)
# Use JTREG_TEST_OPTS for test VM options
# Use JTREG_TESTS for jtreg tests parameter
#
# Most likely you want to select a specific test from test/failure_handler/test
# and manually inspect the results. This target does not actually verify
# anything about the failure_handler's output or even if it ran at all.
#
RUN_DIR := $(FH_SUPPORT)/test
test:

View File

@@ -867,7 +867,7 @@ BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exesigtest := -ljvm
ifeq ($(call isTargetOs, windows), true)
BUILD_HOTSPOT_JTREG_EXECUTABLES_CFLAGS_exeFPRegs := -MT
BUILD_HOTSPOT_JTREG_EXCLUDE += exesigtest.c libterminatedThread.c libTestJNI.c libCompleteExit.c libMonitorWithDeadObjectTest.c libTestPsig.c libnativeStack.c exeGetCreatedJavaVMs.c libTestUnloadedClass.cpp
BUILD_HOTSPOT_JTREG_EXCLUDE += exesigtest.c libterminatedThread.c libTestJNI.c libCompleteExit.c libMonitorWithDeadObjectTest.c libTestPsig.c libnativeStack.c exeGetCreatedJavaVMs.c
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libatExit := jvm.lib
BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exedaemonDestroy := jvm.lib
else
@@ -1510,10 +1510,9 @@ else
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libCompleteExit += -lpthread
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libMonitorWithDeadObjectTest += -lpthread
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libnativeStack += -lpthread
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libTestUnloadedClass += -lpthread
BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exeGetCreatedJavaVMs := -ljvm -lpthread
BUILD_HOTSPOT_JTREG_EXCLUDE += libNativeException.c exeGetProcessorInfo.c
BUILD_HOTSPOT_JTREG_EXCLUDE += libNativeException.c
endif
ifeq ($(ASAN_ENABLED), true)

View File

@@ -80,11 +80,7 @@ ifeq ($(call isTargetOs, windows), true)
BUILD_JDK_JTREG_LIBRARIES_LIBS_libTracePinnedThreads := jvm.lib
BUILD_JDK_JTREG_LIBRARIES_LIBS_libNewDirectByteBuffer := $(WIN_LIB_JAVA)
BUILD_JDK_JTREG_LIBRARIES_LIBS_libGetXSpace := $(WIN_LIB_JAVA)
BUILD_JDK_JTREG_LIBRARIES_LIBS_libFatalErrorTest := $(WIN_LIB_JAVA)
BUILD_JDK_JTREG_LIBRARIES_LIBS_libLogEventTest := $(WIN_LIB_JAVA)
else
BUILD_JDK_JTREG_LIBRARIES_LIBS_libFatalErrorTest := -ljava
BUILD_JDK_JTREG_LIBRARIES_LIBS_libLogEventTest := -ljava
BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := -ljava
BUILD_JDK_JTREG_LIBRARIES_LIBS_libDirectIO := -ljava
BUILD_JDK_JTREG_LIBRARIES_LIBS_libNewDirectByteBuffer := -ljava

View File

@@ -694,11 +694,6 @@ reg_class no_special_ptr_reg %{
return _NO_SPECIAL_PTR_REG_mask;
%}
// Class for all non_special pointer registers (excluding rfp)
reg_class no_special_no_rfp_ptr_reg %{
return _NO_SPECIAL_NO_RFP_PTR_REG_mask;
%}
// Class for all float registers
reg_class float_reg(
V0,
@@ -1130,7 +1125,6 @@ extern RegMask _PTR_REG_mask;
extern RegMask _NO_SPECIAL_REG32_mask;
extern RegMask _NO_SPECIAL_REG_mask;
extern RegMask _NO_SPECIAL_PTR_REG_mask;
extern RegMask _NO_SPECIAL_NO_RFP_PTR_REG_mask;
class CallStubImpl {
@@ -1219,7 +1213,6 @@ source %{
RegMask _NO_SPECIAL_REG32_mask;
RegMask _NO_SPECIAL_REG_mask;
RegMask _NO_SPECIAL_PTR_REG_mask;
RegMask _NO_SPECIAL_NO_RFP_PTR_REG_mask;
void reg_mask_init() {
// We derive below RegMask(s) from the ones which are auto-generated from
@@ -1256,9 +1249,6 @@ source %{
_NO_SPECIAL_REG_mask.Remove(OptoReg::as_OptoReg(r29->as_VMReg()));
_NO_SPECIAL_PTR_REG_mask.Remove(OptoReg::as_OptoReg(r29->as_VMReg()));
}
_NO_SPECIAL_NO_RFP_PTR_REG_mask = _NO_SPECIAL_PTR_REG_mask;
_NO_SPECIAL_NO_RFP_PTR_REG_mask.Remove(OptoReg::as_OptoReg(r29->as_VMReg()));
}
// Optimizaton of volatile gets and puts
@@ -1731,8 +1721,8 @@ void MachPrologNode::format(PhaseRegAlloc *ra_, outputStream *st) const {
st->print("# stack bang size=%d\n\t", framesize);
if (VM_Version::use_rop_protection()) {
st->print("ldr zr, [lr]\n\t");
st->print("paciaz\n\t");
st->print("ldr zr, [lr]\n\t");
st->print("pacia lr, rfp\n\t");
}
if (framesize < ((1 << 9) + 2 * wordSize)) {
st->print("sub sp, sp, #%d\n\t", framesize);
@@ -1861,8 +1851,8 @@ void MachEpilogNode::format(PhaseRegAlloc *ra_, outputStream *st) const {
st->print("ldp lr, rfp, [sp],#%d\n\t", (2 * wordSize));
}
if (VM_Version::use_rop_protection()) {
st->print("autiaz\n\t");
st->print("ldr zr, [lr]\n\t");
st->print("autia lr, rfp\n\t");
st->print("ldr zr, [lr]\n\t");
}
if (do_polling() && C->is_method_compilation()) {
@@ -4895,18 +4885,6 @@ operand iRegPNoSp()
interface(REG_INTER);
%}
// This operand is not allowed to use rfp even if
// rfp is not used to hold the frame pointer.
operand iRegPNoSpNoRfp()
%{
constraint(ALLOC_IN_RC(no_special_no_rfp_ptr_reg));
match(RegP);
match(iRegPNoSp);
op_cost(0);
format %{ %}
interface(REG_INTER);
%}
// Pointer 64 bit Register R0 only
operand iRegP_R0()
%{
@@ -16584,9 +16562,7 @@ instruct CallLeafNoFPDirect(method meth)
// Also known as an 'interprocedural jump'.
// Target of jump will eventually return to caller.
// TailJump below removes the return address.
// Don't use rfp for 'jump_target' because a MachEpilogNode has already been
// emitted just above the TailCall which has reset rfp to the caller state.
instruct TailCalljmpInd(iRegPNoSpNoRfp jump_target, inline_cache_RegP method_ptr)
instruct TailCalljmpInd(iRegPNoSp jump_target, inline_cache_RegP method_ptr)
%{
match(TailCall jump_target method_ptr);
@@ -16599,7 +16575,7 @@ instruct TailCalljmpInd(iRegPNoSpNoRfp jump_target, inline_cache_RegP method_ptr
ins_pipe(pipe_class_call);
%}
instruct TailjmpInd(iRegPNoSpNoRfp jump_target, iRegP_R0 ex_oop)
instruct TailjmpInd(iRegPNoSp jump_target, iRegP_R0 ex_oop)
%{
match(TailJump jump_target ex_oop);

View File

@@ -573,7 +573,7 @@ class Address {
if (size == 0) // It's a byte
i->f(ext().shift() >= 0, 12);
else {
guarantee(ext().shift() <= 0 || ext().shift() == (int)size, "bad shift");
assert(ext().shift() <= 0 || ext().shift() == (int)size, "bad shift");
i->f(ext().shift() > 0, 12);
}
i->f(0b10, 11, 10);
@@ -1088,8 +1088,8 @@ public:
#undef INSN
// we only provide mrs and msr for the special purpose system
// registers where op1 (instr[20:19]) == 11
// n.b msr has L (instr[21]) == 0 mrs has L == 1
// registers where op1 (instr[20:19]) == 11 and, (currently) only
// use it for FPSR n.b msr has L (instr[21]) == 0 mrs has L == 1
void msr(int op1, int CRn, int CRm, int op2, Register rt) {
starti;

View File

@@ -385,7 +385,7 @@ OopMapSet* Runtime1::generate_handle_exception(StubID id, StubAssembler *sasm) {
// load issuing PC (the return address for this stub) into r3
__ ldr(exception_pc, Address(rfp, 1*BytesPerWord));
__ authenticate_return_address(exception_pc);
__ authenticate_return_address(exception_pc, rscratch1);
// make sure that the vm_results are cleared (may be unnecessary)
__ str(zr, Address(rthread, JavaThread::vm_result_offset()));
@@ -434,7 +434,7 @@ OopMapSet* Runtime1::generate_handle_exception(StubID id, StubAssembler *sasm) {
__ str(exception_pc, Address(rthread, JavaThread::exception_pc_offset()));
// patch throwing pc into return address (has bci & oop map)
__ protect_return_address(exception_pc);
__ protect_return_address(exception_pc, rscratch1);
__ str(exception_pc, Address(rfp, 1*BytesPerWord));
// compute the exception handler.
@@ -450,7 +450,7 @@ OopMapSet* Runtime1::generate_handle_exception(StubID id, StubAssembler *sasm) {
__ invalidate_registers(false, true, true, true, true, true);
// patch the return address, this stub will directly return to the exception handler
__ protect_return_address(r0);
__ protect_return_address(r0, rscratch1);
__ str(r0, Address(rfp, 1*BytesPerWord));
switch (id) {

View File

@@ -117,7 +117,7 @@ void C2_MacroAssembler::fast_lock(Register objectReg, Register boxReg, Register
// Try to CAS m->owner from NULL to current thread.
add(tmp, disp_hdr, (in_bytes(ObjectMonitor::owner_offset())-markWord::monitor_value));
cmpxchg(tmp, zr, rthread, Assembler::xword, /*acquire*/ true,
/*release*/ true, /*weak*/ false, tmp3Reg); // Sets flags for result
/*release*/ true, /*weak*/ false, rscratch1); // Sets flags for result
if (LockingMode != LM_LIGHTWEIGHT) {
// Store a non-null value into the box to avoid looking like a re-entrant
@@ -129,7 +129,7 @@ void C2_MacroAssembler::fast_lock(Register objectReg, Register boxReg, Register
}
br(Assembler::EQ, cont); // CAS success means locking succeeded
cmp(tmp3Reg, rthread);
cmp(rscratch1, rthread);
br(Assembler::NE, cont); // Check for recursive locking
// Recursive lock case

View File

@@ -62,7 +62,7 @@ inline frame FreezeBase::sender(const frame& f) {
intptr_t** link_addr = link_address<FKind>(f);
intptr_t* sender_sp = (intptr_t*)(link_addr + frame::sender_sp_offset); // f.unextended_sp() + (fsize/wordSize); //
address sender_pc = ContinuationHelper::return_address_at(sender_sp - 1);
address sender_pc = (address) *(sender_sp-1);
assert(sender_sp != f.sp(), "must have changed");
int slot = 0;
@@ -217,7 +217,7 @@ template<typename FKind> frame ThawBase::new_stack_frame(const frame& hf, frame&
intptr_t* heap_sp = hf.unextended_sp();
// If caller is interpreted it already made room for the callee arguments
int overlap = caller.is_interpreted_frame() ? ContinuationHelper::InterpretedFrame::stack_argsize(hf) : 0;
const int fsize = (int)(ContinuationHelper::InterpretedFrame::frame_bottom(hf) - hf.unextended_sp() - overlap);
const int fsize = ContinuationHelper::InterpretedFrame::frame_bottom(hf) - hf.unextended_sp() - overlap;
const int locals = hf.interpreter_frame_method()->max_locals();
intptr_t* frame_sp = caller.unextended_sp() - fsize;
intptr_t* fp = frame_sp + (hf.fp() - heap_sp);

View File

@@ -68,17 +68,6 @@ inline void ContinuationHelper::push_pd(const frame& f) {
*(intptr_t**)(f.sp() - frame::sender_sp_offset) = f.fp();
}
#define CPU_OVERRIDES_RETURN_ADDRESS_ACCESSORS
inline address ContinuationHelper::return_address_at(intptr_t* sp) {
return pauth_strip_verifiable(*(address*)sp);
}
inline void ContinuationHelper::patch_return_address_at(intptr_t* sp,
address pc) {
*(address*)sp = pauth_sign_return_address(pc);
}
inline void ContinuationHelper::set_anchor_to_entry_pd(JavaFrameAnchor* anchor, ContinuationEntry* entry) {
anchor->set_last_Java_fp(entry->entry_fp());
}
@@ -91,8 +80,7 @@ inline void ContinuationHelper::set_anchor_pd(JavaFrameAnchor* anchor, intptr_t*
inline bool ContinuationHelper::Frame::assert_frame_laid_out(frame f) {
intptr_t* sp = f.sp();
address pc = ContinuationHelper::return_address_at(
sp - frame::sender_sp_ret_address_offset());
address pc = *(address*)(sp - frame::sender_sp_ret_address_offset());
intptr_t* fp = *(intptr_t**)(sp - frame::sender_sp_offset);
assert(f.raw_pc() == pc, "f.ra_pc: " INTPTR_FORMAT " actual: " INTPTR_FORMAT, p2i(f.raw_pc()), p2i(pc));
assert(f.fp() == fp, "f.fp: " INTPTR_FORMAT " actual: " INTPTR_FORMAT, p2i(f.fp()), p2i(fp));
@@ -120,14 +108,13 @@ inline void ContinuationHelper::InterpretedFrame::patch_sender_sp(frame& f, cons
}
inline address ContinuationHelper::Frame::real_pc(const frame& f) {
// Always used in assertions. Just strip it.
address* pc_addr = &(((address*) f.sp())[-1]);
return pauth_strip_pointer(*pc_addr);
return *pc_addr;
}
inline void ContinuationHelper::Frame::patch_pc(const frame& f, address pc) {
address* pc_addr = &(((address*) f.sp())[-1]);
*pc_addr = pauth_sign_return_address(pc);
*pc_addr = pc;
}
inline intptr_t* ContinuationHelper::InterpretedFrame::frame_top(const frame& f, InterpreterOopMap* mask) { // inclusive; this will be copied with the frame

View File

@@ -269,9 +269,6 @@ void DowncallStubGenerator::generate() {
Label L_reguard;
Label L_after_reguard;
if (_needs_transition) {
// Restore cpu control state after JNI call
__ restore_cpu_control_state_after_jni(rscratch1, tmp1);
__ mov(tmp1, _thread_in_native_trans);
__ strw(tmp1, Address(rthread, JavaThread::thread_state_offset()));

View File

@@ -139,7 +139,8 @@ bool frame::safe_for_sender(JavaThread *thread) {
sender_sp = (intptr_t*) addr_at(sender_sp_offset);
sender_unextended_sp = (intptr_t*) this->fp()[interpreter_frame_sender_sp_offset];
saved_fp = (intptr_t*) this->fp()[link_offset];
sender_pc = pauth_strip_verifiable((address) this->fp()[return_addr_offset]);
sender_pc = pauth_strip_verifiable((address) this->fp()[return_addr_offset], (address)saved_fp);
} else {
// must be some sort of compiled/runtime frame
// fp does not have to be safe (although it could be check for c1?)
@@ -157,9 +158,7 @@ bool frame::safe_for_sender(JavaThread *thread) {
sender_unextended_sp = sender_sp;
// Note: frame::sender_sp_offset is only valid for compiled frame
saved_fp = (intptr_t*) *(sender_sp - frame::sender_sp_offset);
// Note: PAC authentication may fail in case broken frame is passed in.
// Just strip it for now.
sender_pc = pauth_strip_pointer((address) *(sender_sp - 1));
sender_pc = pauth_strip_verifiable((address) *(sender_sp-1), (address)saved_fp);
}
if (Continuation::is_return_barrier_entry(sender_pc)) {
@@ -277,8 +276,9 @@ bool frame::safe_for_sender(JavaThread *thread) {
void frame::patch_pc(Thread* thread, address pc) {
assert(_cb == CodeCache::find_blob(pc), "unexpected pc");
address* pc_addr = &(((address*) sp())[-1]);
address signed_pc = pauth_sign_return_address(pc);
address pc_old = pauth_strip_verifiable(*pc_addr);
address signing_sp = (((address*) sp())[-2]);
address signed_pc = pauth_sign_return_address(pc, (address)signing_sp);
address pc_old = pauth_strip_verifiable(*pc_addr, (address)signing_sp);
if (TracePcPatching) {
tty->print("patch_pc at address " INTPTR_FORMAT " [" INTPTR_FORMAT " -> " INTPTR_FORMAT "]",
@@ -472,9 +472,8 @@ frame frame::sender_for_interpreter_frame(RegisterMap* map) const {
}
#endif // COMPILER2_OR_JVMCI
// For ROP protection, Interpreter will have signed the sender_pc,
// but there is no requirement to authenticate it here.
address sender_pc = pauth_strip_verifiable(sender_pc_maybe_signed());
// For ROP protection, Interpreter will have signed the sender_pc, but there is no requirement to authenticate it here.
address sender_pc = pauth_strip_verifiable(sender_pc_maybe_signed(), (address)link());
if (Continuation::is_return_barrier_entry(sender_pc)) {
if (map->walk_cont()) { // about to walk into an h-stack

View File

@@ -93,7 +93,7 @@
// Entry frames
// n.b. these values are determined by the layout defined in
// stubGenerator for the Java call stub
entry_frame_after_call_words = 29,
entry_frame_after_call_words = 27,
entry_frame_call_wrapper_offset = -8,
// we don't need a save area

View File

@@ -152,10 +152,7 @@ inline frame::frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address
setup(pc);
}
inline frame::frame(intptr_t* sp)
: frame(sp, sp,
*(intptr_t**)(sp - frame::sender_sp_offset),
pauth_strip_verifiable(*(address*)(sp - 1))) {}
inline frame::frame(intptr_t* sp) : frame(sp, sp, *(intptr_t**)(sp - frame::sender_sp_offset), *(address*)(sp - 1)) {}
inline frame::frame(intptr_t* sp, intptr_t* fp) {
intptr_t a = intptr_t(sp);
@@ -236,13 +233,13 @@ inline intptr_t* frame::real_fp() const {
inline int frame::frame_size() const {
return is_interpreted_frame()
? pointer_delta_as_int(sender_sp(), sp())
? sender_sp() - sp()
: cb()->frame_size();
}
inline int frame::compiled_frame_stack_argsize() const {
assert(cb()->is_compiled(), "");
return (cb()->as_nmethod()->num_stack_arg_slots() * VMRegImpl::stack_slot_size) >> LogBytesPerWord;
return (cb()->as_compiled_method()->method()->num_stack_arg_slots() * VMRegImpl::stack_slot_size) >> LogBytesPerWord;
}
inline void frame::interpreted_frame_oop_map(InterpreterOopMap* mask) const {
@@ -419,10 +416,9 @@ inline frame frame::sender_for_compiled_frame(RegisterMap* map) const {
: sender_sp();
assert(!_sp_is_trusted || l_sender_sp == real_fp(), "");
// The return_address is always the word on the stack.
// For ROP protection, C1/C2 will have signed the sender_pc,
// but there is no requirement to authenticate it here.
address sender_pc = pauth_strip_verifiable((address) *(l_sender_sp - 1));
// the return_address is always the word on the stack
// For ROP protection, C1/C2 will have signed the sender_pc, but there is no requirement to authenticate it here.
address sender_pc = pauth_strip_verifiable((address) *(l_sender_sp-1), (address) *(l_sender_sp-2));
intptr_t** saved_fp_addr = (intptr_t**) (l_sender_sp - frame::sender_sp_offset);

View File

@@ -38,7 +38,7 @@
// Default value if probing is not implemented for a certain platform
// Max address bit is restricted by implicit assumptions in the code, for instance
// the bit layout of ZForwardingEntry or Partial array entry (see ZMarkStackEntry) in mark stack
// the bit layout of XForwardingEntry or Partial array entry (see XMarkStackEntry) in mark stack
static const size_t DEFAULT_MAX_ADDRESS_BIT = 46;
// Minimum value returned, if probing fail
static const size_t MINIMUM_MAX_ADDRESS_BIT = 36;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2015, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -72,6 +72,4 @@ const bool CCallingConventionRequiresIntsAsLongs = false;
#define USE_POINTERS_TO_REGISTER_IMPL_ARRAY
#define USE_TRAMPOLINE_STUB_FIX_OWNER
#endif // CPU_AARCH64_GLOBALDEFINITIONS_AARCH64_HPP

View File

@@ -1197,110 +1197,6 @@ void MacroAssembler::lookup_interface_method(Register recv_klass,
}
}
// Look up the method for a megamorphic invokeinterface call in a single pass over itable:
// - check recv_klass (actual object class) is a subtype of resolved_klass from CompiledICHolder
// - find a holder_klass (class that implements the method) vtable offset and get the method from vtable by index
// The target method is determined by <holder_klass, itable_index>.
// The receiver klass is in recv_klass.
// On success, the result will be in method_result, and execution falls through.
// On failure, execution transfers to the given label.
void MacroAssembler::lookup_interface_method_stub(Register recv_klass,
Register holder_klass,
Register resolved_klass,
Register method_result,
Register temp_itbl_klass,
Register scan_temp,
int itable_index,
Label& L_no_such_interface) {
// 'method_result' is only used as output register at the very end of this method.
// Until then we can reuse it as 'holder_offset'.
Register holder_offset = method_result;
assert_different_registers(resolved_klass, recv_klass, holder_klass, temp_itbl_klass, scan_temp, holder_offset);
int vtable_start_offset = in_bytes(Klass::vtable_start_offset());
int itable_offset_entry_size = itableOffsetEntry::size() * wordSize;
int ioffset = in_bytes(itableOffsetEntry::interface_offset());
int ooffset = in_bytes(itableOffsetEntry::offset_offset());
Label L_loop_search_resolved_entry, L_resolved_found, L_holder_found;
ldrw(scan_temp, Address(recv_klass, Klass::vtable_length_offset()));
add(recv_klass, recv_klass, vtable_start_offset + ioffset);
// itableOffsetEntry[] itable = recv_klass + Klass::vtable_start_offset() + sizeof(vtableEntry) * recv_klass->_vtable_len;
// temp_itbl_klass = itable[0]._interface;
int vtblEntrySize = vtableEntry::size_in_bytes();
assert(vtblEntrySize == wordSize, "ldr lsl shift amount must be 3");
ldr(temp_itbl_klass, Address(recv_klass, scan_temp, Address::lsl(exact_log2(vtblEntrySize))));
mov(holder_offset, zr);
// scan_temp = &(itable[0]._interface)
lea(scan_temp, Address(recv_klass, scan_temp, Address::lsl(exact_log2(vtblEntrySize))));
// Initial checks:
// - if (holder_klass != resolved_klass), go to "scan for resolved"
// - if (itable[0] == holder_klass), shortcut to "holder found"
// - if (itable[0] == 0), no such interface
cmp(resolved_klass, holder_klass);
br(Assembler::NE, L_loop_search_resolved_entry);
cmp(holder_klass, temp_itbl_klass);
br(Assembler::EQ, L_holder_found);
cbz(temp_itbl_klass, L_no_such_interface);
// Loop: Look for holder_klass record in itable
// do {
// temp_itbl_klass = *(scan_temp += itable_offset_entry_size);
// if (temp_itbl_klass == holder_klass) {
// goto L_holder_found; // Found!
// }
// } while (temp_itbl_klass != 0);
// goto L_no_such_interface // Not found.
Label L_search_holder;
bind(L_search_holder);
ldr(temp_itbl_klass, Address(pre(scan_temp, itable_offset_entry_size)));
cmp(holder_klass, temp_itbl_klass);
br(Assembler::EQ, L_holder_found);
cbnz(temp_itbl_klass, L_search_holder);
b(L_no_such_interface);
// Loop: Look for resolved_class record in itable
// while (true) {
// temp_itbl_klass = *(scan_temp += itable_offset_entry_size);
// if (temp_itbl_klass == 0) {
// goto L_no_such_interface;
// }
// if (temp_itbl_klass == resolved_klass) {
// goto L_resolved_found; // Found!
// }
// if (temp_itbl_klass == holder_klass) {
// holder_offset = scan_temp;
// }
// }
//
Label L_loop_search_resolved;
bind(L_loop_search_resolved);
ldr(temp_itbl_klass, Address(pre(scan_temp, itable_offset_entry_size)));
bind(L_loop_search_resolved_entry);
cbz(temp_itbl_klass, L_no_such_interface);
cmp(resolved_klass, temp_itbl_klass);
br(Assembler::EQ, L_resolved_found);
cmp(holder_klass, temp_itbl_klass);
br(Assembler::NE, L_loop_search_resolved);
mov(holder_offset, scan_temp);
b(L_loop_search_resolved);
// See if we already have a holder klass. If not, go and scan for it.
bind(L_resolved_found);
cbz(holder_offset, L_search_holder);
mov(scan_temp, holder_offset);
// Finally, scan_temp contains holder_klass vtable offset
bind(L_holder_found);
ldrw(method_result, Address(scan_temp, ooffset - ioffset));
add(recv_klass, recv_klass, itable_index * wordSize + in_bytes(itableMethodEntry::method_offset())
- vtable_start_offset - ioffset); // substract offsets to restore the original value of recv_klass
ldr(method_result, Address(recv_klass, method_result, Address::uxtw(0)));
}
// virtual method calling
void MacroAssembler::lookup_virtual_method(Register recv_klass,
RegisterOrConstant vtable_index,
@@ -1508,7 +1404,11 @@ void MacroAssembler::check_klass_subtype_slow_path(Register sub_klass,
}
#ifndef PRODUCT
incrementw(ExternalAddress((address)&SharedRuntime::_partial_subtype_ctr));
mov(rscratch2, (address)&SharedRuntime::_partial_subtype_ctr);
Address pst_counter_addr(rscratch2);
ldr(rscratch1, pst_counter_addr);
add(rscratch1, rscratch1, 1);
str(rscratch1, pst_counter_addr);
#endif //PRODUCT
// We will consult the secondary-super array.
@@ -4435,23 +4335,6 @@ void MacroAssembler::load_klass(Register dst, Register src) {
}
}
void MacroAssembler::restore_cpu_control_state_after_jni(Register tmp1, Register tmp2) {
if (RestoreMXCSROnJNICalls) {
Label OK;
get_fpcr(tmp1);
mov(tmp2, tmp1);
// Set FPCR to the state we need. We do want Round to Nearest. We
// don't want non-IEEE rounding modes or floating-point traps.
bfi(tmp1, zr, 22, 4); // Clear DN, FZ, and Rmode
bfi(tmp1, zr, 8, 5); // Clear exception-control bits (8-12)
bfi(tmp1, zr, 0, 2); // Clear AH:FIZ
eor(tmp2, tmp1, tmp2);
cbz(tmp2, OK); // Only reset FPCR if it's wrong
set_fpcr(tmp1);
bind(OK);
}
}
// ((OopHandle)result).resolve();
void MacroAssembler::resolve_oop_handle(Register result, Register tmp1, Register tmp2) {
// OopHandle::resolve is an indirection.
@@ -6095,43 +5978,51 @@ void MacroAssembler::leave() {
// For more details on PAC see pauth_aarch64.hpp.
// Sign the LR. Use during construction of a stack frame, before storing the LR to memory.
// Uses value zero as the modifier.
// Uses the FP as the modifier.
//
void MacroAssembler::protect_return_address() {
if (VM_Version::use_rop_protection()) {
check_return_address();
paciaz();
// The standard convention for C code is to use paciasp, which uses SP as the modifier. This
// works because in C code, FP and SP match on function entry. In the JDK, SP and FP may not
// match, so instead explicitly use the FP.
pacia(lr, rfp);
}
}
// Sign the return value in the given register. Use before updating the LR in the existing stack
// frame for the current function.
// Uses value zero as the modifier.
// Uses the FP from the start of the function as the modifier - which is stored at the address of
// the current FP.
//
void MacroAssembler::protect_return_address(Register return_reg) {
void MacroAssembler::protect_return_address(Register return_reg, Register temp_reg) {
if (VM_Version::use_rop_protection()) {
assert(PreserveFramePointer, "PreserveFramePointer must be set for ROP protection");
check_return_address(return_reg);
paciza(return_reg);
ldr(temp_reg, Address(rfp));
pacia(return_reg, temp_reg);
}
}
// Authenticate the LR. Use before function return, after restoring FP and loading LR from memory.
// Uses value zero as the modifier.
//
void MacroAssembler::authenticate_return_address() {
void MacroAssembler::authenticate_return_address(Register return_reg) {
if (VM_Version::use_rop_protection()) {
autiaz();
check_return_address();
autia(return_reg, rfp);
check_return_address(return_reg);
}
}
// Authenticate the return value in the given register. Use before updating the LR in the existing
// stack frame for the current function.
// Uses value zero as the modifier.
// Uses the FP from the start of the function as the modifier - which is stored at the address of
// the current FP.
//
void MacroAssembler::authenticate_return_address(Register return_reg) {
void MacroAssembler::authenticate_return_address(Register return_reg, Register temp_reg) {
if (VM_Version::use_rop_protection()) {
autiza(return_reg);
assert(PreserveFramePointer, "PreserveFramePointer must be set for ROP protection");
ldr(temp_reg, Address(rfp));
autia(return_reg, temp_reg);
check_return_address(return_reg);
}
}

View File

@@ -570,19 +570,6 @@ public:
msr(0b011, 0b0100, 0b0100, 0b001, zr);
}
// FPCR : op1 == 011
// CRn == 0100
// CRm == 0100
// op2 == 000
inline void get_fpcr(Register reg) {
mrs(0b11, 0b0100, 0b0100, 0b000, reg);
}
inline void set_fpcr(Register reg) {
msr(0b011, 0b0100, 0b0100, 0b000, reg);
}
// DCZID_EL0: op1 == 011
// CRn == 0000
// CRm == 0000
@@ -729,9 +716,9 @@ public:
// ROP Protection
void protect_return_address();
void protect_return_address(Register return_reg);
void authenticate_return_address();
void authenticate_return_address(Register return_reg);
void protect_return_address(Register return_reg, Register temp_reg);
void authenticate_return_address(Register return_reg = lr);
void authenticate_return_address(Register return_reg, Register temp_reg);
void strip_return_address();
void check_return_address(Register return_reg=lr) PRODUCT_RETURN;
@@ -955,15 +942,6 @@ public:
Label& no_such_interface,
bool return_method = true);
void lookup_interface_method_stub(Register recv_klass,
Register holder_klass,
Register resolved_klass,
Register method_result,
Register temp_reg,
Register temp_reg2,
int itable_index,
Label& L_no_such_interface);
// virtual method calling
// n.b. x86 allows RegisterOrConstant for vtable_index
void lookup_virtual_method(Register recv_klass,
@@ -1046,8 +1024,8 @@ public:
#define verify_method_ptr(reg) _verify_method_ptr(reg, "broken method " #reg, __FILE__, __LINE__)
#define verify_klass_ptr(reg) _verify_klass_ptr(reg, "broken klass " #reg, __FILE__, __LINE__)
// Restore cpu control state after JNI call
void restore_cpu_control_state_after_jni(Register tmp1, Register tmp2);
// only if +VerifyFPU
void verify_FPU(int stack_depth, const char* s = "illegal FPU state");
// prints msg, dumps registers and stops execution
void stop(const char* msg);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -27,7 +27,6 @@
#include "asm/macroAssembler.hpp"
#include "classfile/javaClasses.inline.hpp"
#include "classfile/vmClasses.hpp"
#include "compiler/disassembler.hpp"
#include "interpreter/interpreter.hpp"
#include "interpreter/interpreterRuntime.hpp"
#include "memory/allocation.inline.hpp"
@@ -37,7 +36,7 @@
#include "runtime/frame.inline.hpp"
#include "runtime/stubRoutines.hpp"
#define __ Disassembler::hook<MacroAssembler>(__FILE__, __LINE__, _masm)->
#define __ _masm->
#ifdef PRODUCT
#define BLOCK_COMMENT(str) /* nothing */

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -28,6 +28,7 @@
#include "code/codeCache.hpp"
#include "code/compiledIC.hpp"
#include "gc/shared/collectedHeap.hpp"
#include "memory/resourceArea.hpp"
#include "nativeInst_aarch64.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/handles.hpp"
@@ -158,18 +159,13 @@ void NativeGotJump::verify() const {
}
address NativeCall::destination() const {
address addr = instruction_address();
address destination = addr + displacement();
// Performance optimization: no need to call find_blob() if it is a self-call
if (destination == addr) {
return destination;
}
address addr = (address)this;
address destination = instruction_address() + displacement();
// Do we use a trampoline stub for this call?
CodeBlob* cb = CodeCache::find_blob(addr);
assert(cb != nullptr && cb->is_nmethod(), "nmethod expected");
nmethod *nm = cb->as_nmethod();
assert(cb && cb->is_nmethod(), "sanity");
nmethod *nm = (nmethod *)cb;
if (nm->stub_contains(destination) && is_NativeCallTrampolineStub_at(destination)) {
// Yes we do, so get the destination from the trampoline stub.
const address trampoline_stub_addr = destination;
@@ -184,11 +180,17 @@ address NativeCall::destination() const {
// call instruction at all times.
//
// Used in the runtime linkage of calls; see class CompiledIC.
void NativeCall::set_destination_mt_safe(address dest) {
assert((Patching_lock->is_locked() || SafepointSynchronize::is_at_safepoint()) ||
//
// Add parameter assert_lock to switch off assertion
// during code generation, where no patching lock is needed.
void NativeCall::set_destination_mt_safe(address dest, bool assert_lock) {
assert(!assert_lock ||
(Patching_lock->is_locked() || SafepointSynchronize::is_at_safepoint()) ||
CompiledICLocker::is_safe(addr_at(0)),
"concurrent code patching");
ResourceMark rm;
int code_size = NativeInstruction::instruction_size;
address addr_call = addr_at(0);
bool reachable = Assembler::reachable_from_branch_at(addr_call, dest);
assert(NativeCall::is_call_at(addr_call), "unexpected code at call site");
@@ -212,18 +214,22 @@ void NativeCall::set_destination_mt_safe(address dest) {
}
address NativeCall::get_trampoline() {
address call_addr = instruction_address();
address call_addr = addr_at(0);
CodeBlob *code = CodeCache::find_blob(call_addr);
assert(code != nullptr && code->is_nmethod(), "nmethod expected");
nmethod* nm = code->as_nmethod();
assert(code != nullptr, "Could not find the containing code blob");
address bl_destination = call_addr + displacement();
if (nm->stub_contains(bl_destination) &&
address bl_destination
= MacroAssembler::pd_call_destination(call_addr);
if (code->contains(bl_destination) &&
is_NativeCallTrampolineStub_at(bl_destination))
return bl_destination;
return trampoline_stub_Relocation::get_trampoline_for(call_addr, nm);
if (code->is_nmethod()) {
return trampoline_stub_Relocation::get_trampoline_for(call_addr, (nmethod*)code);
}
return nullptr;
}
// Inserts a native call instruction at a given pc

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2108, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -212,7 +212,6 @@ public:
int displacement() const { return (int_at(displacement_offset) << 6) >> 4; }
address displacement_address() const { return addr_at(displacement_offset); }
address return_address() const { return addr_at(return_address_offset); }
address raw_destination() const { return instruction_address() + displacement(); }
address destination() const;
void set_destination(address dest) {
@@ -252,7 +251,9 @@ public:
//
// Used in the runtime linkage of calls; see class CompiledIC.
// (Cf. 4506997 and 4479829, where threads witnessed garbage displacements.)
void set_destination_mt_safe(address dest);
// The parameter assert_lock disables the assertion during code generation.
void set_destination_mt_safe(address dest, bool assert_lock = true);
address get_trampoline();
#if INCLUDE_JVMCI

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, 2023, Arm Limited. All rights reserved.
* Copyright (c) 2021, 2022, Arm Limited. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -77,9 +77,9 @@ inline bool pauth_ptr_is_raw(address ptr) {
// Strip a return value (same as pauth_strip_pointer). When debug is enabled then authenticate
// instead.
//
inline address pauth_strip_verifiable(address ret_addr) {
inline address pauth_strip_verifiable(address ret_addr, address modifier) {
if (VM_Version::use_rop_protection()) {
DEBUG_ONLY(ret_addr = pauth_authenticate_return_address(ret_addr);)
DEBUG_ONLY(ret_addr = pauth_authenticate_return_address(ret_addr, modifier);)
NOT_DEBUG(ret_addr = pauth_strip_pointer(ret_addr));
}
return ret_addr;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2021, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -52,7 +52,7 @@ class Register {
public:
// accessors
constexpr int raw_encoding() const { return checked_cast<int>(this - first()); }
constexpr int raw_encoding() const { return this - first(); }
constexpr int encoding() const { assert(is_valid(), "invalid register"); return raw_encoding(); }
constexpr bool is_valid() const { return 0 <= raw_encoding() && raw_encoding() < number_of_registers; }
@@ -175,7 +175,7 @@ class FloatRegister {
public:
// accessors
constexpr int raw_encoding() const { return checked_cast<int>(this - first()); }
constexpr int raw_encoding() const { return this - first(); }
constexpr int encoding() const { assert(is_valid(), "invalid register"); return raw_encoding(); }
constexpr bool is_valid() const { return 0 <= raw_encoding() && raw_encoding() < number_of_registers; }
@@ -308,7 +308,7 @@ public:
public:
// accessors
int raw_encoding() const { return checked_cast<int>(this - first()); }
int raw_encoding() const { return this - first(); }
int encoding() const { assert(is_valid(), "invalid register"); return raw_encoding(); }
bool is_valid() const { return 0 <= raw_encoding() && raw_encoding() < number_of_registers; }
bool is_governing() const { return 0 <= raw_encoding() && raw_encoding() < number_of_governing_registers; }

View File

@@ -60,12 +60,13 @@ void Relocation::pd_set_data_value(address x, intptr_t o, bool verify_only) {
address Relocation::pd_call_destination(address orig_addr) {
assert(is_call(), "should be a call here");
if (orig_addr == nullptr) {
if (NativeCall::is_call_at(addr())) {
NativeCall* call = nativeCall_at(addr());
return call->destination();
if (NativeCall::is_call_at(addr())) {
address trampoline = nativeCall_at(addr())->get_trampoline();
if (trampoline) {
return nativeCallTrampolineStub_at(trampoline)->destination();
}
} else {
}
if (orig_addr != nullptr) {
address new_addr = MacroAssembler::pd_call_destination(orig_addr);
// If call is branch to self, don't try to relocate it, just leave it
// as branch to self. This happens during code generation if the code
@@ -81,26 +82,16 @@ address Relocation::pd_call_destination(address orig_addr) {
void Relocation::pd_set_call_destination(address x) {
assert(is_call(), "should be a call here");
if (NativeCall::is_call_at(addr())) {
NativeCall* call = nativeCall_at(addr());
call->set_destination(x);
} else {
MacroAssembler::pd_patch_instruction(addr(), x);
address trampoline = nativeCall_at(addr())->get_trampoline();
if (trampoline) {
nativeCall_at(addr())->set_destination_mt_safe(x, /* assert_lock */false);
return;
}
}
MacroAssembler::pd_patch_instruction(addr(), x);
assert(pd_call_destination(addr()) == x, "fail in reloc");
}
void trampoline_stub_Relocation::pd_fix_owner_after_move() {
NativeCall* call = nativeCall_at(owner());
assert(call->raw_destination() == owner(), "destination should be empty");
address trampoline = addr();
address dest = nativeCallTrampolineStub_at(trampoline)->destination();
if (!Assembler::reachable_from_branch_at(owner(), dest)) {
dest = trampoline;
}
call->set_destination(dest);
}
address* Relocation::pd_address_in_code() {
return (address*)(addr() + 8);
}

View File

@@ -394,7 +394,7 @@ static void patch_callers_callsite(MacroAssembler *masm) {
__ mov(c_rarg0, rmethod);
__ mov(c_rarg1, lr);
__ authenticate_return_address(c_rarg1);
__ authenticate_return_address(c_rarg1, rscratch1);
__ lea(rscratch1, RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::fixup_callers_callsite)));
__ blr(rscratch1);
@@ -1171,7 +1171,6 @@ static void gen_continuation_enter(MacroAssembler* masm,
continuation_enter_cleanup(masm);
__ ldr(c_rarg1, Address(rfp, wordSize)); // return address
__ authenticate_return_address(c_rarg1);
__ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::exception_handler_for_return_address), rthread, c_rarg1);
// see OptoRuntime::generate_exception_blob: r0 -- exception oop, r3 -- exception pc
@@ -1845,9 +1844,6 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
intptr_t return_pc = (intptr_t) __ pc();
oop_maps->add_gc_map(return_pc - start, map);
// Verify or restore cpu control state after JNI call
__ restore_cpu_control_state_after_jni(rscratch1, rscratch2);
// Unpack native results.
switch (ret_type) {
case T_BOOLEAN: __ c2bool(r0); break;
@@ -2341,7 +2337,7 @@ void SharedRuntime::generate_deopt_blob() {
// load throwing pc from JavaThread and patch it as the return address
// of the current frame. Then clear the field in JavaThread
__ ldr(r3, Address(rthread, JavaThread::exception_pc_offset()));
__ protect_return_address(r3);
__ protect_return_address(r3, rscratch1);
__ str(r3, Address(rfp, wordSize));
__ str(zr, Address(rthread, JavaThread::exception_pc_offset()));
@@ -2447,7 +2443,9 @@ void SharedRuntime::generate_deopt_blob() {
__ ldrw(r2, Address(r5, Deoptimization::UnrollBlock::size_of_deoptimized_frame_offset()));
__ sub(r2, r2, 2 * wordSize);
__ add(sp, sp, r2);
__ ldp(rfp, zr, __ post(sp, 2 * wordSize));
__ ldp(rfp, lr, __ post(sp, 2 * wordSize));
__ authenticate_return_address();
// LR should now be the return address to the caller (3)
#ifdef ASSERT
// Compilers generate code that bang the stack by as much as the
@@ -2662,7 +2660,9 @@ void SharedRuntime::generate_uncommon_trap_blob() {
size_of_deoptimized_frame_offset()));
__ sub(r2, r2, 2 * wordSize);
__ add(sp, sp, r2);
__ ldp(rfp, zr, __ post(sp, 2 * wordSize));
__ ldp(rfp, lr, __ post(sp, 2 * wordSize));
__ authenticate_return_address();
// LR should now be the return address to the caller (3) frame
#ifdef ASSERT
// Compilers generate code that bang the stack by as much as the
@@ -2808,7 +2808,7 @@ SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, int poll_t
// it later to determine if someone changed the return address for
// us!
__ ldr(r20, Address(rthread, JavaThread::saved_exception_pc_offset()));
__ protect_return_address(r20);
__ protect_return_address(r20, rscratch1);
__ str(r20, Address(rfp, wordSize));
}
@@ -2849,7 +2849,7 @@ SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, int poll_t
__ ldr(rscratch1, Address(rfp, wordSize));
__ cmp(r20, rscratch1);
__ br(Assembler::NE, no_adjust);
__ authenticate_return_address(r20);
__ authenticate_return_address(r20, rscratch1);
#ifdef ASSERT
// Verify the correct encoding of the poll we're about to skip.
@@ -2864,7 +2864,7 @@ SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, int poll_t
#endif
// Adjust return pc forward to step over the safepoint poll instruction
__ add(r20, r20, NativeInstruction::instruction_size);
__ protect_return_address(r20);
__ protect_return_address(r20, rscratch1);
__ str(r20, Address(rfp, wordSize));
}

View File

@@ -30,15 +30,8 @@
// Java frames don't have callee saved registers (except for rfp), so we can use a smaller RegisterMap
class SmallRegisterMap {
constexpr SmallRegisterMap() = default;
~SmallRegisterMap() = default;
NONCOPYABLE(SmallRegisterMap);
public:
static const SmallRegisterMap* instance() {
static constexpr SmallRegisterMap the_instance{};
return &the_instance;
}
static constexpr SmallRegisterMap* instance = nullptr;
private:
static void assert_is_rfp(VMReg r) NOT_DEBUG_RETURN
DEBUG_ONLY({ assert (r == rfp->as_VMReg() || r == rfp->as_VMReg()->next(), "Reg: %s", r->name()); })
@@ -55,6 +48,17 @@ public:
return map;
}
SmallRegisterMap() {}
SmallRegisterMap(const RegisterMap* map) {
#ifdef ASSERT
for(int i = 0; i < RegisterMap::reg_count; i++) {
VMReg r = VMRegImpl::as_VMReg(i);
if (map->location(r, (intptr_t*)nullptr) != nullptr) assert_is_rfp(r);
}
#endif
}
inline address location(VMReg reg, intptr_t* sp) const {
assert_is_rfp(reg);
return (address)(sp - frame::sender_sp_offset);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,6 @@
#define CPU_AARCH64_STACKCHUNKFRAMESTREAM_AARCH64_INLINE_HPP
#include "interpreter/oopMapCache.hpp"
#include "pauth_aarch64.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/registerMap.hpp"
@@ -35,7 +34,7 @@ template <ChunkFrames frame_kind>
inline bool StackChunkFrameStream<frame_kind>::is_in_frame(void* p0) const {
assert(!is_done(), "");
intptr_t* p = (intptr_t*)p0;
int argsize = is_compiled() ? (_cb->as_nmethod()->num_stack_arg_slots() * VMRegImpl::stack_slot_size) >> LogBytesPerWord : 0;
int argsize = is_compiled() ? (_cb->as_compiled_method()->method()->num_stack_arg_slots() * VMRegImpl::stack_slot_size) >> LogBytesPerWord : 0;
int frame_size = _cb->frame_size() + argsize;
return p == sp() - frame::sender_sp_offset || ((p - unextended_sp()) >= 0 && (p - unextended_sp()) < frame_size);
}
@@ -53,8 +52,7 @@ inline frame StackChunkFrameStream<frame_kind>::to_frame() const {
template <ChunkFrames frame_kind>
inline address StackChunkFrameStream<frame_kind>::get_pc() const {
assert(!is_done(), "");
// Just strip it for frames on the heap.
return pauth_strip_pointer(*(address*)(_sp - 1));
return *(address*)(_sp - 1);
}
template <ChunkFrames frame_kind>
@@ -116,8 +114,8 @@ inline int StackChunkFrameStream<frame_kind>::interpreter_frame_num_oops() const
f.interpreted_frame_oop_map(&mask);
return mask.num_oops()
+ 1 // for the mirror oop
+ pointer_delta_as_int((intptr_t*)f.interpreter_frame_monitor_begin(),
(intptr_t*)f.interpreter_frame_monitor_end())/BasicObjectLock::size();
+ ((intptr_t*)f.interpreter_frame_monitor_begin()
- (intptr_t*)f.interpreter_frame_monitor_end())/BasicObjectLock::size();
}
template<>

View File

@@ -84,7 +84,10 @@ class StubGenerator: public StubCodeGenerator {
#define inc_counter_np(counter) ((void)0)
#else
void inc_counter_np_(int& counter) {
__ incrementw(ExternalAddress((address)&counter));
__ lea(rscratch2, ExternalAddress((address)&counter));
__ ldrw(rscratch1, Address(rscratch2));
__ addw(rscratch1, rscratch1, 1);
__ strw(rscratch1, Address(rscratch2));
}
#define inc_counter_np(counter) \
BLOCK_COMMENT("inc_counter " #counter); \
@@ -136,8 +139,7 @@ class StubGenerator: public StubCodeGenerator {
// [ return_from_Java ] <--- sp
// [ argument word n ]
// ...
// -29 [ argument word 1 ]
// -28 [ saved Floating-point Control Register ]
// -27 [ argument word 1 ]
// -26 [ saved v15 ] <--- sp_after_call
// -25 [ saved v14 ]
// -24 [ saved v13 ]
@@ -169,9 +171,8 @@ class StubGenerator: public StubCodeGenerator {
// Call stub stack layout word offsets from fp
enum call_stub_layout {
sp_after_call_off = -28,
sp_after_call_off = -26,
fpcr_off = sp_after_call_off,
d15_off = -26,
d13_off = -24,
d11_off = -22,
@@ -201,9 +202,8 @@ class StubGenerator: public StubCodeGenerator {
StubCodeMark mark(this, "StubRoutines", "call_stub");
address start = __ pc();
const Address sp_after_call (rfp, sp_after_call_off * wordSize);
const Address sp_after_call(rfp, sp_after_call_off * wordSize);
const Address fpcr_save (rfp, fpcr_off * wordSize);
const Address call_wrapper (rfp, call_wrapper_off * wordSize);
const Address result (rfp, result_off * wordSize);
const Address result_type (rfp, result_type_off * wordSize);
@@ -252,14 +252,6 @@ class StubGenerator: public StubCodeGenerator {
__ stpd(v13, v12, d13_save);
__ stpd(v15, v14, d15_save);
__ get_fpcr(rscratch1);
__ str(rscratch1, fpcr_save);
// Set FPCR to the state we need. We do want Round to Nearest. We
// don't want non-IEEE rounding modes or floating-point traps.
__ bfi(rscratch1, zr, 22, 4); // Clear DN, FZ, and Rmode
__ bfi(rscratch1, zr, 8, 5); // Clear exception-control bits (8-12)
__ set_fpcr(rscratch1);
// install Java thread in global register now we have saved
// whatever value it held
__ mov(rthread, c_rarg7);
@@ -373,10 +365,6 @@ class StubGenerator: public StubCodeGenerator {
__ ldp(r22, r21, r22_save);
__ ldp(r20, r19, r20_save);
// restore fpcr
__ ldr(rscratch1, fpcr_save);
__ set_fpcr(rscratch1);
__ ldp(c_rarg0, c_rarg1, call_wrapper);
__ ldrw(c_rarg2, result_type);
__ ldr(c_rarg3, method);
@@ -7020,10 +7008,8 @@ class StubGenerator: public StubCodeGenerator {
if (return_barrier_exception) {
__ ldr(c_rarg1, Address(rfp, wordSize)); // return address
__ authenticate_return_address(c_rarg1);
__ verify_oop(r0);
// save return value containing the exception oop in callee-saved R19
__ mov(r19, r0);
__ mov(r19, r0); // save return value contaning the exception oop in callee-saved R19
__ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::exception_handler_for_return_address), rthread, c_rarg1);
@@ -7033,7 +7019,7 @@ class StubGenerator: public StubCodeGenerator {
// see OptoRuntime::generate_exception_blob: r0 -- exception oop, r3 -- exception pc
__ mov(r1, r0); // the exception handler
__ mov(r0, r19); // restore return value containing the exception oop
__ mov(r0, r19); // restore return value contaning the exception oop
__ verify_oop(r0);
__ leave();

View File

@@ -26,7 +26,6 @@
#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "classfile/javaClasses.hpp"
#include "compiler/disassembler.hpp"
#include "compiler/compiler_globals.hpp"
#include "gc/shared/barrierSetAssembler.hpp"
#include "interpreter/bytecodeHistogram.hpp"
@@ -64,7 +63,7 @@
// Max size with JVMTI
int TemplateInterpreter::InterpreterCodeSize = 200 * 1024;
#define __ Disassembler::hook<InterpreterMacroAssembler>(__FILE__, __LINE__, _masm)->
#define __ _masm->
//-----------------------------------------------------------------------------
@@ -1367,9 +1366,6 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
__ get_method(rmethod);
// result potentially in r0 or v0
// Restore cpu control state after JNI call
__ restore_cpu_control_state_after_jni(rscratch1, rscratch2);
// make room for the pushes we're about to do
__ sub(rscratch1, esp, 4 * wordSize);
__ andr(sp, rscratch1, -16);
@@ -1827,7 +1823,7 @@ void TemplateInterpreterGenerator::generate_throw_exception() {
Label caller_not_deoptimized;
__ ldr(c_rarg1, Address(rfp, frame::return_addr_offset * wordSize));
// This is a return address, so requires authenticating for PAC.
__ authenticate_return_address(c_rarg1);
__ authenticate_return_address(c_rarg1, rscratch1);
__ super_call_VM_leaf(CAST_FROM_FN_PTR(address,
InterpreterRuntime::interpreter_contains), c_rarg1);
__ cbnz(r0, caller_not_deoptimized);
@@ -1993,21 +1989,13 @@ void TemplateInterpreterGenerator::set_vtos_entry_points(Template* t,
address& vep) {
assert(t->is_valid() && t->tos_in() == vtos, "illegal template");
Label L;
aep = __ pc(); // atos entry point
__ push_ptr();
__ b(L);
fep = __ pc(); // ftos entry point
__ push_f();
__ b(L);
dep = __ pc(); // dtos entry point
__ push_d();
__ b(L);
lep = __ pc(); // ltos entry point
__ push_l();
__ b(L);
bep = cep = sep = iep = __ pc(); // [bcsi]tos entry point
__ push_i();
vep = __ pc(); // vtos entry point
aep = __ pc(); __ push_ptr(); __ b(L);
fep = __ pc(); __ push_f(); __ b(L);
dep = __ pc(); __ push_d(); __ b(L);
lep = __ pc(); __ push_l(); __ b(L);
bep = cep = sep =
iep = __ pc(); __ push_i();
vep = __ pc();
__ bind(L);
generate_and_dispatch(t);
}

View File

@@ -25,7 +25,6 @@
#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "compiler/disassembler.hpp"
#include "compiler/compilerDefinitions.inline.hpp"
#include "gc/shared/barrierSetAssembler.hpp"
#include "gc/shared/collectedHeap.hpp"
@@ -47,7 +46,7 @@
#include "runtime/synchronizer.hpp"
#include "utilities/powerOfTwo.hpp"
#define __ Disassembler::hook<InterpreterMacroAssembler>(__FILE__, __LINE__, _masm)->
#define __ _masm->
// Address computation: local variables

View File

@@ -213,9 +213,10 @@ void VM_Version::initialize() {
}
}
// Neoverse N1, N2, V1, V2
if (_cpu == CPU_ARM && (model_is(0xd0c) || model_is(0xd49) ||
model_is(0xd40) || model_is(0xd4f))) {
// Neoverse N1, N2 and V1
if (_cpu == CPU_ARM && ((_model == 0xd0c || _model2 == 0xd0c)
|| (_model == 0xd49 || _model2 == 0xd49)
|| (_model == 0xd40 || _model2 == 0xd40))) {
if (FLAG_IS_DEFAULT(UseSIMDForMemoryOps)) {
FLAG_SET_DEFAULT(UseSIMDForMemoryOps, true);
}
@@ -463,12 +464,16 @@ void VM_Version::initialize() {
strcmp(UseBranchProtection, "pac-ret") == 0) {
_rop_protection = false;
// Enable ROP-protection if
// 1) this code has been built with branch-protection and
// 2) the CPU/OS supports it
// 1) this code has been built with branch-protection,
// 2) the CPU/OS supports it, and
// 3) incompatible VMContinuations isn't enabled.
#ifdef __ARM_FEATURE_PAC_DEFAULT
if (!VM_Version::supports_paca()) {
// Disable PAC to prevent illegal instruction crashes.
warning("ROP-protection specified, but not supported on this CPU. Disabling ROP-protection.");
} else if (VMContinuations) {
// Not currently compatible with continuation freeze/thaw.
warning("ROP-protection is incompatible with VMContinuations. Disabling ROP-protection.");
} else {
_rop_protection = true;
}
@@ -483,6 +488,12 @@ void VM_Version::initialize() {
// Determine the mask of address bits used for PAC. Clear bit 55 of
// the input to make it look like a user address.
_pac_mask = (uintptr_t)pauth_strip_pointer((address)~(UINT64_C(1) << 55));
// The frame pointer must be preserved for ROP protection.
if (FLAG_IS_DEFAULT(PreserveFramePointer) == false && PreserveFramePointer == false ) {
vm_exit_during_initialization(err_msg("PreserveFramePointer cannot be disabled for ROP-protection"));
}
PreserveFramePointer = true;
}
#ifdef COMPILER2

View File

@@ -152,10 +152,6 @@ enum Ampere_CPU_Model {
static int cpu_variant() { return _variant; }
static int cpu_revision() { return _revision; }
static bool model_is(int cpu_model) {
return _model == cpu_model || _model2 == cpu_model;
}
static bool is_zva_enabled() { return 0 <= _zva_length; }
static int zva_length() {
assert(is_zva_enabled(), "ZVA not available");

View File

@@ -175,7 +175,7 @@ VtableStub* VtableStubs::create_itable_stub(int itable_index) {
// so all registers except arguments are free at this point.
const Register recv_klass_reg = r10;
const Register holder_klass_reg = r16; // declaring interface klass (DECC)
const Register resolved_klass_reg = r17; // resolved interface klass (REFC)
const Register resolved_klass_reg = rmethod; // resolved interface klass (REFC)
const Register temp_reg = r11;
const Register temp_reg2 = r15;
const Register icholder_reg = rscratch2;
@@ -192,13 +192,28 @@ VtableStub* VtableStubs::create_itable_stub(int itable_index) {
__ load_klass(recv_klass_reg, j_rarg0);
// Receiver subtype check against REFC.
__ lookup_interface_method(// inputs: rec. class, interface
recv_klass_reg, resolved_klass_reg, noreg,
// outputs: scan temp. reg1, scan temp. reg2
temp_reg2, temp_reg,
L_no_such_interface,
/*return_method=*/false);
const ptrdiff_t typecheckSize = __ pc() - start_pc;
start_pc = __ pc();
// Get selected method from declaring class and itable index
__ lookup_interface_method_stub(recv_klass_reg, holder_klass_reg, resolved_klass_reg, rmethod,
temp_reg, temp_reg2, itable_index, L_no_such_interface);
__ lookup_interface_method(// inputs: rec. class, interface, itable index
recv_klass_reg, holder_klass_reg, itable_index,
// outputs: method, scan temp. reg
rmethod, temp_reg,
L_no_such_interface);
const ptrdiff_t lookupSize = __ pc() - start_pc;
// Reduce "estimate" such that "padding" does not drop below 8.
const ptrdiff_t estimate = 144;
const ptrdiff_t codesize = __ pc() - start_pc;
const ptrdiff_t estimate = 124;
const ptrdiff_t codesize = typecheckSize + lookupSize;
slop_delta = (int)(estimate - codesize);
slop_bytes += slop_delta;
assert(slop_delta >= 0, "itable #%d: Code size estimate (%d) for lookup_interface_method too small, required: %d", itable_index, (int)estimate, (int)codesize);

View File

@@ -30,15 +30,8 @@
// Java frames don't have callee saved registers (except for rfp), so we can use a smaller RegisterMap
class SmallRegisterMap {
constexpr SmallRegisterMap() = default;
~SmallRegisterMap() = default;
NONCOPYABLE(SmallRegisterMap);
public:
static const SmallRegisterMap* instance() {
static constexpr SmallRegisterMap the_instance{};
return &the_instance;
}
static constexpr SmallRegisterMap* instance = nullptr;
private:
static void assert_is_rfp(VMReg r) NOT_DEBUG_RETURN
DEBUG_ONLY({ Unimplemented(); })
@@ -53,6 +46,12 @@ public:
return map;
}
SmallRegisterMap() {}
SmallRegisterMap(const RegisterMap* map) {
Unimplemented();
}
inline address location(VMReg reg, intptr_t* sp) const {
Unimplemented();
return nullptr;

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2024 SAP SE. All rights reserved.
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2023 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -78,9 +78,9 @@ int Assembler::branch_destination(int inst, int pos) {
// Low-level andi-one-instruction-macro.
void Assembler::andi(Register a, Register s, const long ui16) {
if (is_power_of_2(((unsigned long) ui16)+1)) {
if (is_power_of_2(((jlong) ui16)+1)) {
// pow2minus1
clrldi(a, s, 64 - log2i_exact((((unsigned long) ui16)+1)));
clrldi(a, s, 64 - log2i_exact((((jlong) ui16)+1)));
} else if (is_power_of_2((jlong) ui16)) {
// pow2
rlwinm(a, s, 0, 31 - log2i_exact((jlong) ui16), 31 - log2i_exact((jlong) ui16));

View File

@@ -135,20 +135,9 @@ void LIR_Assembler::osr_entry() {
// copied into place by code emitted in the IR.
Register OSR_buf = osrBufferPointer()->as_register();
{
assert(frame::interpreter_frame_monitor_size() == BasicObjectLock::size(), "adjust code below");
const int locals_space = BytesPerWord * method()->max_locals();
int monitor_offset = locals_space + (2 * BytesPerWord) * (number_of_locks - 1);
bool use_OSR_bias = false;
if (!Assembler::is_simm16(monitor_offset + BytesPerWord) && number_of_locks > 0) {
// Offsets too large for ld instructions. Use bias.
__ add_const_optimized(OSR_buf, OSR_buf, locals_space);
monitor_offset -= locals_space;
use_OSR_bias = true;
}
{ assert(frame::interpreter_frame_monitor_size() == BasicObjectLock::size(), "adjust code below");
int monitor_offset = BytesPerWord * method()->max_locals() +
(2 * BytesPerWord) * (number_of_locks - 1);
// SharedRuntime::OSR_migration_begin() packs BasicObjectLocks in
// the OSR buffer using 2 word entries: first the lock and then
// the oop.
@@ -174,11 +163,6 @@ void LIR_Assembler::osr_entry() {
__ ld(R0, slot_offset + 1*BytesPerWord, OSR_buf);
__ std(R0, mo.disp(), mo.base());
}
if (use_OSR_bias) {
// Restore.
__ sub_const_optimized(OSR_buf, OSR_buf, locals_space);
}
}
}

View File

@@ -578,7 +578,7 @@ inline bool can_handle_logic_op_as_uimm(ValueType *type, Bytecodes::Code bc) {
is_power_of_2(int_or_long_const) ||
is_power_of_2(-int_or_long_const))) return true;
if (bc == Bytecodes::_land &&
(is_power_of_2((unsigned long)int_or_long_const+1) ||
(is_power_of_2(int_or_long_const+1) ||
(Assembler::is_uimm(int_or_long_const, 32) && is_power_of_2(int_or_long_const)) ||
(int_or_long_const != min_jlong && is_power_of_2(-int_or_long_const)))) return true;

View File

@@ -34,5 +34,21 @@
// Processor dependent initialization of C2 compiler for ppc.
void Compile::pd_compiler2_init() {
guarantee(CodeEntryAlignment >= InteriorEntryAlignment, "");
// Power7 and later.
if (PowerArchitecturePPC64 > 6) {
if (FLAG_IS_DEFAULT(UsePopCountInstruction)) {
FLAG_SET_ERGO(UsePopCountInstruction, true);
}
}
if (!VM_Version::has_isel() && FLAG_IS_DEFAULT(ConditionalMoveLimit)) {
FLAG_SET_ERGO(ConditionalMoveLimit, 0);
}
if (OptimizeFill) {
warning("OptimizeFill is not supported on this CPU.");
FLAG_SET_DEFAULT(OptimizeFill, false);
}
}

View File

@@ -117,9 +117,9 @@ bool frame::safe_for_sender(JavaThread *thread) {
return false;
}
volatile common_abi* sender_abi = (common_abi*) fp; // May get updated concurrently by deoptimization!
common_abi* sender_abi = (common_abi*) fp;
intptr_t* sender_sp = (intptr_t*) fp;
address sender_pc = (address) sender_abi->lr;
address sender_pc = (address) sender_abi->lr;;
if (Continuation::is_return_barrier_entry(sender_pc)) {
// If our sender_pc is the return barrier, then our "real" sender is the continuation entry
@@ -134,18 +134,9 @@ bool frame::safe_for_sender(JavaThread *thread) {
return false;
}
intptr_t* unextended_sender_sp = is_interpreted_frame() ? interpreter_frame_sender_sp() : sender_sp;
// If the sender is a deoptimized nmethod we need to check if the original pc is valid.
nmethod* sender_nm = sender_blob->as_nmethod_or_null();
if (sender_nm != nullptr && sender_nm->is_deopt_pc(sender_pc)) {
address orig_pc = *(address*)((address)unextended_sender_sp + sender_nm->orig_pc_offset());
if (!sender_nm->insts_contains_inclusive(orig_pc)) return false;
}
// It should be safe to construct the sender though it might not be valid.
frame sender(sender_sp, sender_pc, unextended_sender_sp, nullptr /* fp */, sender_blob);
frame sender(sender_sp, sender_pc);
// Do we have a valid fp?
address sender_fp = (address) sender.fp();

View File

@@ -363,7 +363,7 @@ inline const ImmutableOopMap* frame::get_oop_map() const {
inline int frame::compiled_frame_stack_argsize() const {
assert(cb()->is_compiled(), "");
return (cb()->as_nmethod()->num_stack_arg_slots() * VMRegImpl::stack_slot_size) >> LogBytesPerWord;
return (cb()->as_compiled_method()->method()->num_stack_arg_slots() * VMRegImpl::stack_slot_size) >> LogBytesPerWord;
}
inline void frame::interpreted_frame_oop_map(InterpreterOopMap* mask) const {

Some files were not shown because too many files have changed in this diff Show More