Skip to content

Commit acb7f37

Browse files
committed
Merge master jdk-17.0.5+2 into openj9-staging
Signed-off-by: J9 Build <[email protected]>
2 parents d5540d6 + 5661c9c commit acb7f37

File tree

23 files changed

+939
-142
lines changed

23 files changed

+939
-142
lines changed

make/autoconf/flags-cflags.m4

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,18 @@ AC_DEFUN([FLAGS_SETUP_DEBUG_SYMBOLS],
116116
CFLAGS_DEBUG_SYMBOLS="-g"
117117
ASFLAGS_DEBUG_SYMBOLS="-g"
118118
elif test "x$TOOLCHAIN_TYPE" = xclang; then
119+
if test "x$ALLOW_ABSOLUTE_PATHS_IN_OUTPUT" = "xfalse"; then
120+
# Check if compiler supports -fdebug-prefix-map. If so, use that to make
121+
# the debug symbol paths resolve to paths relative to the workspace root.
122+
workspace_root_trailing_slash="${WORKSPACE_ROOT%/}/"
123+
DEBUG_PREFIX_CFLAGS="-fdebug-prefix-map=${workspace_root_trailing_slash}="
124+
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${DEBUG_PREFIX_CFLAGS}],
125+
IF_FALSE: [
126+
DEBUG_PREFIX_CFLAGS=
127+
]
128+
)
129+
fi
130+
119131
CFLAGS_DEBUG_SYMBOLS="-g"
120132
ASFLAGS_DEBUG_SYMBOLS="-g"
121133
elif test "x$TOOLCHAIN_TYPE" = xxlc; then

make/common/NativeCompilation.gmk

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,9 @@ define SetupCompileNativeFileBody
359359
$1_FLAGS := $(BASIC_ASFLAGS) $$($1_BASE_ASFLAGS)
360360
$1_COMPILER := $(AS)
361361

362-
# gcc assembly files must contain an appropriate relative .file
362+
# gcc or clang assembly files must contain an appropriate relative .file
363363
# path for reproducible builds.
364-
ifeq ($(TOOLCHAIN_TYPE), gcc)
364+
ifneq ($(findstring $(TOOLCHAIN_TYPE), gcc clang), )
365365
# If no absolute paths allowed, work out relative source file path
366366
# for assembly .file substitution, otherwise use full file path
367367
ifeq ($(ALLOW_ABSOLUTE_PATHS_IN_OUTPUT), false)
@@ -403,8 +403,9 @@ define SetupCompileNativeFileBody
403403
$1_OBJ_DEPS := $$($1_SRC_FILE) $$($$($1_BASE)_COMPILE_VARDEPS_FILE) \
404404
$$($$($1_BASE)_EXTRA_DEPS) $$($1_VARDEPS_FILE)
405405
$1_COMPILE_OPTIONS := $$($1_FLAGS) $(CC_OUT_OPTION)$$($1_OBJ) $$($1_SRC_FILE)
406-
# For reproducible builds with gcc ensure random symbol generation is seeded deterministically
407-
ifeq ($(TOOLCHAIN_TYPE), gcc)
406+
# For reproducible builds with gcc and clang ensure random symbol generation is
407+
# seeded deterministically
408+
ifneq ($(findstring $(TOOLCHAIN_TYPE), gcc clang), )
408409
ifeq ($$(ENABLE_REPRODUCIBLE_BUILD), true)
409410
$1_COMPILE_OPTIONS += -frandom-seed="$$($1_FILENAME)"
410411
endif

make/data/currency/CurrencyData.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -32,7 +32,7 @@ formatVersion=3
3232
# Version of the currency code information in this class.
3333
# It is a serial number that accompanies with each amendment.
3434

35-
dataVersion=170
35+
dataVersion=172
3636

3737
# List of all valid ISO 4217 currency codes.
3838
# To ensure compatibility, do not remove codes.
@@ -51,7 +51,7 @@ all=ADP020-AED784-AFA004-AFN971-ALL008-AMD051-ANG532-AOA973-ARS032-ATS040-AUD036
5151
MTL470-MUR480-MVR462-MWK454-MXN484-MXV979-MYR458-MZM508-MZN943-NAD516-NGN566-\
5252
NIO558-NLG528-NOK578-NPR524-NZD554-OMR512-PAB590-PEN604-PGK598-PHP608-\
5353
PKR586-PLN985-PTE620-PYG600-QAR634-ROL642-RON946-RSD941-RUB643-RUR810-RWF646-SAR682-\
54-
SBD090-SCR690-SDD736-SDG938-SEK752-SGD702-SHP654-SIT705-SKK703-SLL694-SOS706-\
54+
SBD090-SCR690-SDD736-SDG938-SEK752-SGD702-SHP654-SIT705-SKK703-SLE925-SLL694-SOS706-\
5555
SRD968-SRG740-SSP728-STD678-STN930-SVC222-SYP760-SZL748-THB764-TJS972-TMM795-TMT934-TND788-TOP776-\
5656
TPE626-TRL792-TRY949-TTD780-TWD901-TZS834-UAH980-UGX800-USD840-USN997-USS998-UYI940-\
5757
UYU858-UZS860-VEB862-VED926-VEF937-VES928-VND704-VUV548-WST882-XAF950-XAG961-XAU959-XBA955-\
@@ -484,7 +484,7 @@ CS=CSD
484484
# SEYCHELLES
485485
SC=SCR
486486
# SIERRA LEONE
487-
SL=SLL
487+
SL=SLE
488488
# SINGAPORE
489489
SG=SGD
490490
# SLOVAKIA

src/java.base/share/classes/sun/util/resources/CurrencyNames.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -221,6 +221,7 @@ SGD=SGD
221221
SHP=SHP
222222
SIT=SIT
223223
SKK=SKK
224+
SLE=SLE
224225
SLL=SLL
225226
SOS=SOS
226227
SRD=SRD
@@ -445,6 +446,7 @@ sgd=Singapore Dollar
445446
shp=Saint Helena Pound
446447
sit=Slovenian Tolar
447448
skk=Slovak Koruna
449+
sle=Sierra Leonean Leone
448450
sll=Sierra Leonean Leone
449451
sos=Somali Shilling
450452
srd=Surinamese Dollar

src/java.base/windows/classes/sun/nio/ch/PipeImpl.java

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import java.net.InetSocketAddress;
3434
import java.net.SocketAddress;
3535
import java.net.StandardSocketOptions;
36+
import java.net.UnixDomainSocketAddress;
3637
import java.nio.*;
3738
import java.nio.channels.*;
3839
import java.nio.file.Files;
@@ -44,6 +45,7 @@
4445
import java.security.SecureRandom;
4546
import java.util.Random;
4647

48+
import static java.net.StandardProtocolFamily.UNIX;
4749

4850
/**
4951
* A simple Pipe implementation based on a socket connection.
@@ -67,12 +69,14 @@ private static class Initializer
6769
{
6870

6971
private final SelectorProvider sp;
72+
private final boolean preferUnixDomain;
7073
private IOException ioe;
7174
SourceChannelImpl source;
7275
SinkChannelImpl sink;
7376

74-
private Initializer(SelectorProvider sp) {
77+
private Initializer(SelectorProvider sp, boolean preferUnixDomain) {
7578
this.sp = sp;
79+
this.preferUnixDomain = preferUnixDomain;
7680
}
7781

7882
@Override
@@ -120,7 +124,7 @@ public void run() {
120124
// Bind ServerSocketChannel to a port on the loopback
121125
// address
122126
if (ssc == null || !ssc.isOpen()) {
123-
ssc = createListener();
127+
ssc = createListener(preferUnixDomain);
124128
sa = ssc.getLocalAddress();
125129
}
126130

@@ -162,28 +166,34 @@ public void run() {
162166
try {
163167
if (ssc != null)
164168
ssc.close();
169+
if (sa instanceof UnixDomainSocketAddress uaddr) {
170+
Files.deleteIfExists(uaddr.getPath());
171+
}
165172
} catch (IOException e2) {}
166173
}
167174
}
168175
}
169176
}
170177

171178
/**
172-
* Creates a Pipe implementation that supports buffering.
179+
* Creates a (TCP) Pipe implementation that supports buffering.
173180
*/
174181
PipeImpl(SelectorProvider sp) throws IOException {
175-
this(sp, true);
182+
this(sp, true, false);
176183
}
177184

178185
/**
179-
* Creates Pipe implementation that supports optionally buffering.
186+
* Creates Pipe implementation that supports optionally buffering
187+
* and is TCP by default, but if Unix domain is supported and
188+
* preferAfUnix is true, then Unix domain sockets are used.
189+
*
190+
* @param preferAfUnix use Unix domain sockets if supported
180191
*
181-
* @implNote Uses a loopback connection. When buffering is
182-
* disabled then it sets TCP_NODELAY on the sink channel.
192+
* @param buffering if false set TCP_NODELAY on TCP sockets
183193
*/
184194
@SuppressWarnings("removal")
185-
PipeImpl(SelectorProvider sp, boolean buffering) throws IOException {
186-
Initializer initializer = new Initializer(sp);
195+
PipeImpl(SelectorProvider sp, boolean preferAfUnix, boolean buffering) throws IOException {
196+
Initializer initializer = new Initializer(sp, preferAfUnix);
187197
try {
188198
AccessController.doPrivileged(initializer);
189199
SinkChannelImpl sink = initializer.sink;
@@ -205,8 +215,19 @@ public SinkChannelImpl sink() {
205215
return sink;
206216
}
207217

208-
private static ServerSocketChannel createListener() throws IOException {
209-
ServerSocketChannel listener = ServerSocketChannel.open();
218+
private static ServerSocketChannel createListener(boolean preferUnixDomain) throws IOException {
219+
ServerSocketChannel listener = null;
220+
if (preferUnixDomain && UnixDomainSockets.isSupported()) {
221+
try {
222+
listener = ServerSocketChannel.open(UNIX);
223+
listener.bind(null);
224+
return listener;
225+
} catch (IOException | UnsupportedOperationException e) {
226+
if (listener != null)
227+
listener.close();
228+
}
229+
}
230+
listener = ServerSocketChannel.open();
210231
InetAddress lb = InetAddress.getLoopbackAddress();
211232
listener.bind(new InetSocketAddress(lb, 0));
212233
return listener;

src/java.base/windows/classes/sun/nio/ch/WEPollSelectorImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class WEPollSelectorImpl extends SelectorImpl {
7575

7676
// wakeup support
7777
try {
78-
this.pipe = new PipeImpl(sp, /*buffering*/ false);
78+
this.pipe = new PipeImpl(sp, /* AF_UNIX */ true, /*buffering*/ false);
7979
} catch (IOException ioe) {
8080
WEPoll.freePollArray(pollArrayAddress);
8181
WEPoll.close(eph);

src/java.base/windows/classes/sun/nio/ch/WindowsSelectorImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ private static final class MapEntry {
139139
WindowsSelectorImpl(SelectorProvider sp) throws IOException {
140140
super(sp);
141141
pollWrapper = new PollArrayWrapper(INIT_CAP);
142-
wakeupPipe = new PipeImpl(sp, false);
142+
wakeupPipe = new PipeImpl(sp, /* AF_UNIX */ true, /*buffering*/ false);
143143
wakeupSourceFd = ((SelChImpl)wakeupPipe.source()).getFDVal();
144144
wakeupSinkFd = ((SelChImpl)wakeupPipe.sink()).getFDVal();
145145
pollWrapper.addWakeupSocket(wakeupSourceFd, 0);

src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMsg.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* @author G. Todd Miller
3434
* @author Erwin Bolwidt <[email protected]>
3535
* @author Morten Jorgensen
36-
* @LastModified: Jan 2022
36+
* @LastModified: Jul 2022
3737
*/
3838
public final class ErrorMsg {
3939

@@ -169,7 +169,7 @@ public final class ErrorMsg {
169169
public static final String OUTLINE_ERR_METHOD_TOO_BIG =
170170
"OUTLINE_ERR_METHOD_TOO_BIG";
171171

172-
public static final String DESERIALIZE_TRANSLET_ERR = "DESERIALIZE_TEMPLATES_ERR";
172+
public static final String DESERIALIZE_TRANSLET_ERR = "DESERIALIZE_TRANSLET_ERR";
173173

174174
public static final String XPATH_LIMIT = "XPATH_LIMIT";
175175
public static final String XPATH_GROUP_LIMIT = "XPATH_GROUP_LIMIT";

src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* Also you need to update the count of messages(MAX_CODE)or
3232
* the count of warnings(MAX_WARNING) [ Information purpose only]
3333
* @xsl.usage advanced
34-
* @LastModified: Apr 2022
34+
* @LastModified: Jul 2022
3535
*/
3636
public class XPATHErrorResources extends ListResourceBundle
3737
{
@@ -322,8 +322,8 @@ public class XPATHErrorResources extends ListResourceBundle
322322
public static final String ER_SECUREPROCESSING_FEATURE = "ER_SECUREPROCESSING_FEATURE";
323323
public static final String ER_NULL_XPATH_FUNCTION_RESOLVER = "ER_NULL_XPATH_FUNCTION_RESOLVER";
324324
public static final String ER_NULL_XPATH_VARIABLE_RESOLVER = "ER_NULL_XPATH_VARIABLE_RESOLVER";
325-
public static final String ER_XPATH_GROUP_LIMIT = "XPATH_GROUP_LIMIT";
326-
public static final String ER_XPATH_OPERATOR_LIMIT = "XPATH_OPERATOR_LIMIT";
325+
public static final String ER_XPATH_GROUP_LIMIT = "ER_XPATH_GROUP_LIMIT";
326+
public static final String ER_XPATH_OPERATOR_LIMIT = "ER_XPATH_OPERATOR_LIMIT";
327327

328328
//END: Keys needed for exception messages of JAXP 1.3 XPath API implementation
329329

test/jdk/java/awt/Graphics2D/DrawString/LCDTextSrcEa.java

Lines changed: 26 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2010, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -23,44 +23,38 @@
2323

2424
/**
2525
* @test
26-
* @key headful
27-
* @bug 6996867
26+
* @bug 6996867 8223543
27+
* @requires (os.family == "windows")
2828
* @summary Render as LCD Text in SrcEa composite mode.
2929
*/
3030

31-
import java.awt.*;
32-
import java.awt.event.*;
33-
import java.awt.image.*;
31+
import java.awt.AlphaComposite;
32+
import java.awt.Color;
33+
import java.awt.Graphics2D;
34+
import java.awt.RenderingHints;
35+
import java.awt.image.BufferedImage;
3436

35-
public class LCDTextSrcEa extends Component {
36-
37-
static int SZ=150;
38-
BufferedImage target =
39-
new BufferedImage(SZ, SZ, BufferedImage.TYPE_INT_RGB);
40-
41-
public static void main(String args[]) {
42-
Frame f = new Frame("LCD Text SrcEa Test");
43-
f.addWindowListener(new WindowAdapter() {
44-
@Override
45-
public void windowClosing(WindowEvent e) {
46-
System.exit(0);
47-
}
48-
});
49-
LCDTextSrcEa td = new LCDTextSrcEa();
50-
f.add("Center", td);
51-
f.pack();
52-
f.setVisible(true);
53-
}
54-
55-
public Dimension getPreferredSize() {
56-
return new Dimension(SZ,SZ);
57-
}
58-
59-
public void paint(Graphics gx) {
37+
public class LCDTextSrcEa {
6038

39+
public static void main(String[] args) {
40+
String os = System.getProperty("os.name");
41+
if (os.toLowerCase().startsWith("mac")) {
42+
System.out.println("macOS doesn't support LCD any more. Skipping");
43+
return;
44+
}
45+
/* Sometimes freetype on Linux is built without LCD support, so
46+
* it can't be relied upon to test there.
47+
*/
48+
if (os.toLowerCase().startsWith("linux")) {
49+
System.out.println("Linux freetype may not do LCD. Skipping");
50+
return;
51+
}
52+
int SZ=200;
53+
BufferedImage target =
54+
new BufferedImage(SZ, SZ, BufferedImage.TYPE_INT_RGB);
6155
Graphics2D g2d = (Graphics2D) target.getGraphics();
6256
g2d.setColor(Color.white);
63-
g2d.fillRect(0, 0, getWidth(), getHeight());
57+
g2d.fillRect(0, 0, SZ, SZ);
6458

6559
g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC, 0.01f));
6660
g2d.setRenderingHint(
@@ -72,7 +66,6 @@ public void paint(Graphics gx) {
7266

7367
g2d.setColor(Color.black);
7468
g2d.drawString("Some sample text.", 10, 20);
75-
gx.drawImage(target, 0, 0, null);
7669
boolean nongrey = false;
7770
//Test BI: should be some non-greyscale color
7871
for (int px=0;px<SZ;px++) {

0 commit comments

Comments
 (0)