Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion make/common/MakeBase.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ $(eval $(call SetupLogging))

################################################################################

MAX_PARAMS := 36
MAX_PARAMS := 96
PARAM_SEQUENCE := $(call sequence, 2, $(MAX_PARAMS))

# Template for creating a macro taking named parameters. To use it, assign the
Expand Down
7 changes: 5 additions & 2 deletions make/common/NativeCompilation.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -363,18 +363,20 @@ define SetupCompileNativeFileBody
endif

$1_BASE_CFLAGS := $$($$($1_BASE)_CFLAGS) $$($$($1_BASE)_EXTRA_CFLAGS) \
$$($$($1_BASE)_SYSROOT_CFLAGS) $$($1_WARNINGS_FLAGS)
$$($$($1_BASE)_SYSROOT_CFLAGS)
$1_BASE_CXXFLAGS := $$($$($1_BASE)_CXXFLAGS) $$($$($1_BASE)_EXTRA_CXXFLAGS) \
$$($$($1_BASE)_SYSROOT_CFLAGS) $$($1_EXTRA_CXXFLAGS) $$($1_WARNINGS_FLAGS)
$$($$($1_BASE)_SYSROOT_CFLAGS) $$($1_EXTRA_CXXFLAGS)
$1_BASE_ASFLAGS := $$($$($1_BASE)_ASFLAGS) $$($$($1_BASE)_EXTRA_ASFLAGS)

ifneq ($$(filter %.c, $$($1_FILENAME)), )
# Compile as a C file
$1_CFLAGS += $$($1_WARNINGS_FLAGS)
$1_FLAGS := $(CFLAGS_CCACHE) $$($1_USE_PCH_FLAGS) $$($1_BASE_CFLAGS) \
$$($1_OPT_CFLAGS) $$($1_CFLAGS) -c
$1_COMPILER := $$($$($1_BASE)_CC)
else ifneq ($$(filter %.m, $$($1_FILENAME)), )
# Compile as an Objective-C file
$1_CFLAGS += $$($1_WARNINGS_FLAGS)
$1_FLAGS := -x objective-c $(CFLAGS_CCACHE) $$($1_USE_PCH_FLAGS) \
$$($1_BASE_CFLAGS) $$($1_OPT_CFLAGS) $$($1_CFLAGS) -c
$1_COMPILER := $$($$($1_BASE)_CC)
Expand All @@ -398,6 +400,7 @@ define SetupCompileNativeFileBody
endif
else ifneq ($$(filter %.cpp %.cc %.mm, $$($1_FILENAME)), )
# Compile as a C++ or Objective-C++ file
$1_CXXFLAGS += $$($1_WARNINGS_FLAGS)
$1_FLAGS := $(CFLAGS_CCACHE) $$($1_USE_PCH_FLAGS) $$($1_BASE_CXXFLAGS) \
$$($1_OPT_CXXFLAGS) $$($1_CXXFLAGS) -c
$1_COMPILER := $$($$($1_BASE)_CXX)
Expand Down
3 changes: 3 additions & 0 deletions make/hotspot/lib/CompileGtest.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,12 @@ $(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBJVM, \
CFLAGS_macosx := -DGTEST_OS_MAC=1, \
DISABLED_WARNINGS_gcc := $(DISABLED_WARNINGS_gcc) \
undef stringop-overflow, \
DISABLED_WARNINGS_gcc_test_threadCpuLoad.cpp := address, \
DISABLED_WARNINGS_clang := $(DISABLED_WARNINGS_clang) \
undef switch format-nonliteral tautological-undefined-compare \
self-assign-overloaded, \
DISABLED_WARNINGS_clang_test_g1ServiceThread.cpp := delete-abstract-non-virtual-dtor, \
DISABLED_WARNINGS_clang_test_logDecorations.cpp := missing-field-initializers, \
DISABLED_WARNINGS_microsoft := $(DISABLED_WARNINGS_microsoft), \
LDFLAGS := $(JVM_LDFLAGS), \
LDFLAGS_unix := -L$(JVM_OUTPUTDIR)/libgtest, \
Expand Down
61 changes: 45 additions & 16 deletions make/hotspot/lib/CompileJvm.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,17 @@ endif
################################################################################
# Disabled warnings

DISABLED_WARNINGS_gcc := parentheses comment unknown-pragmas address \
delete-non-virtual-dtor char-subscripts array-bounds int-in-bool-context \
ignored-qualifiers missing-field-initializers implicit-fallthrough \
empty-body strict-overflow sequence-point maybe-uninitialized \
misleading-indentation cast-function-type shift-negative-value

ifeq ($(call check-jvm-feature, zero), true)
DISABLED_WARNINGS_gcc += return-type switch clobbered
DISABLED_WARNINGS_gcc := array-bounds comment delete-non-virtual-dtor \
empty-body ignored-qualifiers implicit-fallthrough int-in-bool-context \
maybe-uninitialized missing-field-initializers parentheses \
shift-negative-value unknown-pragmas strict-overflow

DISABLED_WARNINGS_clang := ignored-qualifiers sometimes-uninitialized \
missing-braces delete-non-abstract-non-virtual-dtor unknown-pragmas

ifneq ($(DEBUG_LEVEL), release)
# Assert macro gives warning
DISABLED_WARNINGS_clang += tautological-constant-out-of-range-compare
endif

ifeq ($(DEBUG_LEVEL), fastdebug)
Expand All @@ -94,16 +97,9 @@ ifeq ($(DEBUG_LEVEL), fastdebug)
endif
endif

DISABLED_WARNINGS_clang := tautological-compare \
undefined-var-template sometimes-uninitialized unknown-pragmas \
delete-non-virtual-dtor missing-braces char-subscripts \
ignored-qualifiers missing-field-initializers mismatched-tags \
shift-negative-value misleading-indentation

DISABLED_WARNINGS_xlc := tautological-compare shift-negative-value

DISABLED_WARNINGS_microsoft := 4100 4127 4146 4201 4244 4291 4351 \
4511 4512 4514 4624 4996
DISABLED_WARNINGS_microsoft := 4624 4244 4291 4146 4127 4996

################################################################################
# Platform specific setup
Expand Down Expand Up @@ -157,9 +153,42 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJVM, \
abstract_vm_version.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \
arguments.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \
DISABLED_WARNINGS_gcc := $(DISABLED_WARNINGS_gcc), \
DISABLED_WARNINGS_gcc_ad_$(HOTSPOT_TARGET_CPU_ARCH).cpp := nonnull, \
DISABLED_WARNINGS_gcc_assembler_aarch64.cpp := misleading-indentation, \
DISABLED_WARNINGS_gcc_c1_LIR.cpp := misleading-indentation, \
DISABLED_WARNINGS_gcc_cgroupV1Subsystem_linux.cpp := address, \
DISABLED_WARNINGS_gcc_cgroupV2Subsystem_linux.cpp := address, \
DISABLED_WARNINGS_gcc_dict.cpp := char-subscripts, \
DISABLED_WARNINGS_gcc_interp_masm_x86.cpp := uninitialized, \
DISABLED_WARNINGS_gcc_javaClasses.cpp := misleading-indentation, \
DISABLED_WARNINGS_gcc_loopnode.cpp := sequence-point, \
DISABLED_WARNINGS_gcc_postaloc.cpp := address, \
DISABLED_WARNINGS_gcc_sharedRuntimeTrig.cpp := misleading-indentation, \
DISABLED_WARNINGS_gcc_shenandoahBarrierSet.cpp := misleading-indentation, \
DISABLED_WARNINGS_gcc_shenandoahBarrierSetAssembler_aarch64.cpp := misleading-indentation, \
DISABLED_WARNINGS_gcc_shenandoahBarrierSetAssembler_ppc.cpp := misleading-indentation, \
DISABLED_WARNINGS_gcc_shenandoahBarrierSetAssembler_riscv.cpp := misleading-indentation, \
DISABLED_WARNINGS_gcc_shenandoahBarrierSetAssembler_x86.cpp := misleading-indentation, \
DISABLED_WARNINGS_gcc_shenandoahBarrierSetC1_aarch64.cpp := misleading-indentation, \
DISABLED_WARNINGS_gcc_shenandoahBarrierSetC1_ppc.cpp := misleading-indentation, \
DISABLED_WARNINGS_gcc_shenandoahBarrierSetC1_riscv.cpp := misleading-indentation, \
DISABLED_WARNINGS_gcc_shenandoahBarrierSetC1_x86.cpp := misleading-indentation, \
DISABLED_WARNINGS_gcc_shenandoahBarrierSetC1.cpp := misleading-indentation, \
DISABLED_WARNINGS_clang := $(DISABLED_WARNINGS_clang), \
DISABLED_WARNINGS_clang_arguments.cpp := missing-field-initializers, \
DISABLED_WARNINGS_clang_codeBuffer.cpp := tautological-undefined-compare, \
DISABLED_WARNINGS_clang_dict.cpp := char-subscripts, \
DISABLED_WARNINGS_clang_directivesParser.cpp := missing-field-initializers, \
DISABLED_WARNINGS_clang_g1ParScanThreadState.cpp := delete-abstract-non-virtual-dtor, \
DISABLED_WARNINGS_clang_g1YoungGCPostEvacuateTasks.cpp := delete-abstract-non-virtual-dtor, \
DISABLED_WARNINGS_clang_heapShared.cpp := missing-field-initializers, \
DISABLED_WARNINGS_clang_management.cpp := missing-field-initializers, \
DISABLED_WARNINGS_clang_notificationThread.cpp := bitwise-instead-of-logical, \
DISABLED_WARNINGS_clang_os_posix.cpp := mismatched-tags missing-field-initializers, \
DISABLED_WARNINGS_clang_postaloc.cpp := tautological-undefined-compare, \
DISABLED_WARNINGS_clang_serviceThread.cpp := bitwise-instead-of-logical, \
DISABLED_WARNINGS_clang_vm_version_x86.cpp := missing-field-initializers, \
DISABLED_WARNINGS_clang_zTracer.cpp := undefined-var-template, \
DISABLED_WARNINGS_xlc := $(DISABLED_WARNINGS_xlc), \
DISABLED_WARNINGS_microsoft := $(DISABLED_WARNINGS_microsoft), \
ASFLAGS := $(JVM_ASFLAGS), \
Expand Down
4 changes: 0 additions & 4 deletions make/hotspot/lib/JvmOverrideFiles.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ ifeq ($(TOOLCHAIN_TYPE), gcc)
BUILD_LIBJVM_vmStructs.cpp_CXXFLAGS := -fno-var-tracking-assignments
BUILD_LIBJVM_jvmciCompilerToVM.cpp_CXXFLAGS := -fno-var-tracking-assignments
BUILD_LIBJVM_jvmciCompilerToVMInit.cpp_CXXFLAGS := -fno-var-tracking-assignments
BUILD_LIBJVM_assembler_x86.cpp_CXXFLAGS := -Wno-maybe-uninitialized
BUILD_LIBJVM_cardTableBarrierSetAssembler_x86.cpp_CXXFLAGS := -Wno-maybe-uninitialized
BUILD_LIBJVM_interp_masm_x86.cpp_CXXFLAGS := -Wno-uninitialized
BUILD_LIBJVM_ad_$(HOTSPOT_TARGET_CPU_ARCH).cpp_CXXFLAGS := -Wno-nonnull
ifeq ($(DEBUG_LEVEL), release)
# Need extra inlining to collapse shared marking code into the hot marking loop
BUILD_LIBJVM_shenandoahMark.cpp_CXXFLAGS := --param inline-unit-growth=1000
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/aarch64/aarch64.ad
Original file line number Diff line number Diff line change
Expand Up @@ -3398,7 +3398,7 @@ encode %{
}
%}

/// mov envcodings
// mov encodings

enc_class aarch64_enc_movw_imm(iRegI dst, immI src) %{
C2_MacroAssembler _masm(&cbuf);
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/opto/compile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ Compile::Compile( ciEnv* ci_env, ciMethod* target, int osr_bci,
// If any phase is randomized for stress testing, seed random number
// generation and log the seed for repeatability.
if (StressLCM || StressGCM || StressIGVN || StressCCP) {
if (FLAG_IS_DEFAULT(StressSeed) || (FLAG_IS_ERGO(StressSeed) && RepeatCompilation)) {
if (FLAG_IS_DEFAULT(StressSeed) || (FLAG_IS_ERGO(StressSeed) && directive->RepeatCompilationOption)) {
_stress_seed = static_cast<uint>(Ticks::now().nanoseconds());
FLAG_SET_ERGO(StressSeed, _stress_seed);
} else {
Expand Down
4 changes: 3 additions & 1 deletion src/hotspot/share/utilities/exceptions.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024, 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
Expand Down Expand Up @@ -440,6 +440,7 @@ void Exceptions::wrap_dynamic_exception(bool is_indy, JavaThread* THREAD) {
// Pass through an Error, including BootstrapMethodError, any other form
// of linkage error, or say ThreadDeath/OutOfMemoryError
if (ls != NULL) {
ResourceMark rm(THREAD);
ls->print_cr("bootstrap method invocation wraps BSME around " INTPTR_FORMAT, p2i((void *)exception));
exception->print_on(ls);
}
Expand All @@ -448,6 +449,7 @@ void Exceptions::wrap_dynamic_exception(bool is_indy, JavaThread* THREAD) {

// Otherwise wrap the exception in a BootstrapMethodError
if (ls != NULL) {
ResourceMark rm(THREAD);
ls->print_cr("%s throws BSME for " INTPTR_FORMAT, is_indy ? "invokedynamic" : "dynamic constant", p2i((void *)exception));
exception->print_on(ls);
}
Expand Down
1 change: 1 addition & 0 deletions test/hotspot/jtreg/runtime/Thread/TooSmallStackSize.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
* VMThreadStackSize values should result in an error message that shows
* the minimum stack size value for each thread type.
* @library /test/lib
* @requires vm.flagless
* @modules java.base/jdk.internal.misc
* java.management
* @run driver TooSmallStackSize
Expand Down
92 changes: 92 additions & 0 deletions test/jdk/java/awt/InputMethods/SpanishDiacriticsTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
/*
* Copyright (c) 2016, 2024, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/

/*
* @test
* @bug 8169355
* @summary Check if Spanish diacritical signs could be typed for TextField
* @requires (os.family == "windows")
* @library /java/awt/regtesthelpers
* @run main/manual SpanishDiacriticsTest
*/


import java.util.concurrent.locks.LockSupport;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import javax.swing.JFrame;
import javax.swing.JTextField;
import javax.swing.SwingUtilities;
import javax.swing.WindowConstants;

public class SpanishDiacriticsTest {

static final String INSTRUCTIONS = """
This test requires the following keyboard layout to be installed:
Windows OS: Spanish (United States) with 'Latin American' keyboard layout.
If using a US layout, the results should still be as described but
you have not tested the real bug.

1. A frame with a text field should be displayed.
2. Set focus to the text field and switch to Spanish
with 'Latin American' keyboard layout.
3. Type the following: ' ' o - i.e. single quote two times, then o.
If your keyboard has a US physical layout the [ key can be used
to type the single quote when in 'Latin American' keyboard mode.
4. Type these characters at a normal speed but do NOT be concerned
that they take several seconds to display. That is an
expected behaviour for this test.

If the text field displays the same three characters you typed: ''o
(i.e. two single quotes followed by o without an acute)
then press Pass; otherwise press Fail.
""";

public static void main(String[] args) throws Exception {

PassFailJFrame.builder()
.title("Spanish Diacritics")
.instructions(INSTRUCTIONS)
.rows(20)
.columns(50)
.testUI(SpanishDiacriticsTest::createTestUI)
.build()
.awaitAndCheck();
}

static JFrame createTestUI() {
JFrame frame = new JFrame("Spanish Diacritics Test Frame");
JTextField textField = new JTextField(20);
textField.addKeyListener(new KeyAdapter() {
@Override
public void keyTyped(KeyEvent e) {
LockSupport.parkNanos(1_000_000_000L);
}
});
frame.add(textField);
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.pack();
return frame;
}
}

This file was deleted.

This file was deleted.

Loading
Loading