Compare commits

..

7 Commits

Author SHA1 Message Date
Severin Gehwolf
19a1861dc6 8220283: ZGC fails to build on GCC 4.4.7: ATTRIBUTE_ALIGNED compatibility issue
Reviewed-by: shade, kbarrett
2019-03-07 16:15:43 +01:00
Thomas Stuefe
a044cb6765 8219650: [Testbug] Fix potential crashes in new test hotspot gtest "test_print_hex_dump"
Reviewed-by: clanger, shade
2019-02-28 14:22:03 +01:00
Goetz Lindenmaier
90a85a8562 8219651: compiler/ciReplay/TestServerVM.java is failing on windows
Reviewed-by: thartmann, kvn
2019-03-06 16:01:01 +01:00
Gerard Ziemski
a433cf3043 8219789: [TESTBUG] TestOptionsWithRanges.java produces hs_err_pidXXXXX.log file for VMThreadStackSize=9007199254740991
Excluded test of mac range for VMThreadStackSize

Reviewed-by: coleenp, mseledtsov
2019-02-28 10:55:07 -06:00
Goetz Lindenmaier
25a64a5c95 Merge 2019-03-06 08:34:36 +01:00
Goetz Lindenmaier
3135657b8c Added tag jdk-11.0.3+2 for changeset 9de3f198995c 2019-03-06 08:31:59 +01:00
Naoto Sato
bc51902963 8217609: New era placeholder not recognized by java.text.SimpleDateFormat
Reviewed-by: nishjain, rriggs
2019-01-29 07:46:50 -08:00
10 changed files with 93 additions and 24 deletions

View File

@@ -534,3 +534,4 @@ a01e0cc0105972acc3b5e213dbe2b84acaee5be3 jdk-11.0.2-ga
0000000000000000000000000000000000000000 jdk-11.0.2-ga
144d476b6efe527c5e9ebf19af93398913c5450f jdk-11.0.2-ga
cd1c042181e934a1a91f9ee59a0066f64c8bad7a jdk-11.0.3+1
9de3f198995c6c384fd6431c97089c311ec6a7ff jdk-11.0.3+2

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2015, 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
@@ -40,7 +40,7 @@ enum CalendarType {
{0, 2}, // generic
{0, 2}, // gregorian
{0, 1}, // buddhist
{232, 4}, // japanese (eras from Meiji)
{232, 5}, // japanese (eras from Meiji)
{0, 2}, // roc (Minguo)
{0, 1}, // islamic (Hijrah)
{0, 1}, // islamic-civil (same as islamic)

View File

@@ -873,6 +873,8 @@ void os::abort(bool dump_core) {
void os::print_hex_dump(outputStream* st, address start, address end, int unitsize) {
assert(unitsize == 1 || unitsize == 2 || unitsize == 4 || unitsize == 8, "just checking");
start = align_down(start, unitsize);
int cols = 0;
int cols_per_line = 0;
switch (unitsize) {

View File

@@ -280,6 +280,9 @@ inline int wcslen(const jchar* x) { return wcslen((const wchar_t*)x); }
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55382 and
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53017
//
#define ATTRIBUTE_ALIGNED(x) __attribute__((aligned(x+0)))
// GCC versions older than 4.6.4 would fail even with "+0", and needs additional
// cast to typeof(x) to work around the similar bug.
//
#define ATTRIBUTE_ALIGNED(x) __attribute__((aligned((typeof(x))x+0)))
#endif // SHARE_VM_UTILITIES_GLOBALDEFINITIONS_GCC_HPP

View File

@@ -3633,6 +3633,7 @@ Warnings: All cp values have U+FE0F characters removed. See /annotationsDerived/
<era type="233">大正</era>
<era type="234">昭和</era>
<era type="235">平成</era>
<era type="236">元号</era> <!-- NewEra -->
</eraAbbr>
<eraNarrow>
<era type="0">大化</era>
@@ -3871,6 +3872,7 @@ Warnings: All cp values have U+FE0F characters removed. See /annotationsDerived/
<era type="233">T</era>
<era type="234">S</era>
<era type="235">H</era>
<era type="236">N</era> <!-- NewEra -->
</eraNarrow>
</eras>
<dateFormats>

View File

@@ -2030,6 +2030,7 @@ Warnings: All cp values have U+FE0F characters removed. See /annotationsDerived/
<era type="233">Taishō</era>
<era type="234">Shōwa</era>
<era type="235">Heisei</era>
<era type="236">NewEra</era> <!-- NewEra -->
</eraAbbr>
<eraNarrow>
<era type="0">Taika (645650)</era>
@@ -2268,6 +2269,7 @@ Warnings: All cp values have U+FE0F characters removed. See /annotationsDerived/
<era type="233">T</era>
<era type="234">S</era>
<era type="235">H</era>
<era type="236">N</era> <!-- NewEra -->
</eraNarrow>
</eras>
<dateFormats>

View File

@@ -153,28 +153,81 @@ TEST_VM_ASSERT_MSG(os, page_size_for_region_with_zero_min_pages, "sanity") {
}
#endif
TEST(os, test_print_hex_dump) {
static void do_test_print_hex_dump(address addr, size_t len, int unitsize, const char* expected) {
char buf[256];
buf[0] = '\0';
stringStream ss(buf, sizeof(buf));
os::print_hex_dump(&ss, addr, addr + len, unitsize);
// tty->print_cr("expected: %s", expected);
// tty->print_cr("result: %s", buf);
ASSERT_NE(strstr(buf, expected), (char*)NULL);
}
TEST_VM(os, test_print_hex_dump) {
const char* pattern [4] = {
#ifdef VM_LITTLE_ENDIAN
"00 01 02 03 04 05 06 07",
"0100 0302 0504 0706",
"03020100 07060504",
"0706050403020100"
#else
"00 01 02 03 04 05 06 07",
"0001 0203 0405 0607",
"00010203 04050607",
"0001020304050607"
#endif
};
const char* pattern_not_readable [4] = {
"?? ?? ?? ?? ?? ?? ?? ??",
"???? ???? ???? ????",
"???????? ????????",
"????????????????"
};
// On AIX, zero page is readable.
address unreadable =
#ifdef AIX
(address) 0xFFFFFFFFFFFF0000ULL;
#else
(address) 0
#endif
;
ResourceMark rm;
stringStream ss;
char buf[64];
stringStream ss(buf, sizeof(buf));
outputStream* out = &ss;
// outputStream* out = tty; // enable for printout
// Test dumping unreadable memory does not fail
os::print_hex_dump(out, (address)0, (address)100, 1);
os::print_hex_dump(out, (address)0, (address)100, 2);
os::print_hex_dump(out, (address)0, (address)100, 4);
os::print_hex_dump(out, (address)0, (address)100, 8);
// Test dumping unreadable memory
// Exclude test for Windows for now, since it needs SEH handling to work which cannot be
// guaranteed when we call directly into VM code. (see JDK-8220220)
#ifndef _WIN32
do_test_print_hex_dump(unreadable, 100, 1, pattern_not_readable[0]);
do_test_print_hex_dump(unreadable, 100, 2, pattern_not_readable[1]);
do_test_print_hex_dump(unreadable, 100, 4, pattern_not_readable[2]);
do_test_print_hex_dump(unreadable, 100, 8, pattern_not_readable[3]);
#endif
// Test dumping readable memory does not fail
char arr[100];
// Test dumping readable memory
address arr = (address)os::malloc(100, mtInternal);
for (int c = 0; c < 100; c++) {
arr[c] = c;
}
address addr = (address)&arr;
os::print_hex_dump(out, addr, addr + 100, 1);
os::print_hex_dump(out, addr, addr + 100, 2);
os::print_hex_dump(out, addr, addr + 100, 4);
os::print_hex_dump(out, addr, addr + 100, 8);
// properly aligned
do_test_print_hex_dump(arr, 100, 1, pattern[0]);
do_test_print_hex_dump(arr, 100, 2, pattern[1]);
do_test_print_hex_dump(arr, 100, 4, pattern[2]);
do_test_print_hex_dump(arr, 100, 8, pattern[3]);
// Not properly aligned. Should automatically down-align by unitsize
do_test_print_hex_dump(arr + 1, 100, 2, pattern[1]);
do_test_print_hex_dump(arr + 1, 100, 4, pattern[2]);
do_test_print_hex_dump(arr + 1, 100, 8, pattern[3]);
os::free(arr);
}
//////////////////////////////////////////////////////////////////////////////

View File

@@ -289,7 +289,7 @@ public abstract class CiReplayBase {
try {
String cmd = ProcessTools.getCommandLine(ProcessTools.createJavaProcessBuilder(true, args));
return new String[]{"sh", "-c", prefix
+ (Platform.isWindows() ? cmd.replace('\\', '/').replace(";", "\\;") : cmd)};
+ (Platform.isWindows() ? cmd.replace('\\', '/').replace(";", "\\;").replace("|", "\\|") : cmd)};
} catch(Throwable t) {
throw new Error("Can't create process builder: " + t, t);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 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
@@ -203,7 +203,13 @@ public class TestOptionsWithRanges {
allOptionsAsMap = JVMOptionsUtils.getOptionsWithRangeAsMap(origin -> (!(origin.contains("develop") || origin.contains("notproduct"))));
/*
* Remove CICompilerCount from testing because currently it can hang system
* Exclude VMThreadStackSize from max range testing, because it will always exit with code 1,
* which technically passes, but really it fails, and worse yet, it produces hs_err_pid file.
*/
excludeTestMaxRange("VMThreadStackSize");
/*
* Exclude CICompilerCount from testing because currently it can hang system
*/
excludeTestMaxRange("CICompilerCount");

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 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
@@ -23,7 +23,7 @@
/*
* @test
* @bug 8202088 8207152
* @bug 8202088 8207152 8217609
* @summary Test the localized Japanese new era name (May 1st. 2019-)
* is retrieved no matter CLDR provider contains the name or not.
* @modules jdk.localedata
@@ -53,8 +53,8 @@ public class JapaneseEraNameTest {
// type, locale, name
{ LONG, JAPAN, "\u5143\u53f7" }, // NewEra
{ LONG, US, "NewEra" },
{ SHORT, JAPAN, "N" },
{ SHORT, US, "N" },
{ SHORT, JAPAN, "\u5143\u53f7" },
{ SHORT, US, "NewEra" },
};
}