This commit is contained in:
Phil Race 2018-08-03 09:42:57 -07:00
commit 32ec91ca9b
88 changed files with 1649 additions and 1261 deletions
.hgtags
src
test
hotspot/jtreg
ProblemList-graal.txtProblemList.txt
runtime/classFileParserBug
serviceability/jvmti/GetModulesInfo
vmTestbase
jit/escape/LockCoarsening
LockCoarsening001
LockCoarsening002
metaspace
gc
shrink_grow/CompressedClassSpaceSize
nsk
jdb/exclude/exclude001
jdi
AttachingConnector
attach/attach002
attachnosuspend/attachnosuspend001
BScenarios
hotswap/tc10x001
multithrd/tc02x004
ClassType
invokeMethod/invokemethod009
newInstance/newinstance002
EventQueue/remove_l/remove_l005
EventRequest/setEnabled/setenabled003
EventRequestManager
createStepRequest/crstepreq001
deleteEventRequest/delevtreq002
ObjectReference/invokeMethod/invokemethod006
StackFrame/_bounds_/bounds001
ThreadGroupReference/resume/resume001
ThreadReference
frameCount/framecount001
isSuspended/issuspended002
resume/resume001
stop/stop001
VirtualMachine/redefineClasses
redefineclasses021
redefineclasses023
stress/ClassPrepareEvents/ClassPrepareEvents001
jdwp/ThreadReference/ForceEarlyReturn/forceEarlyReturn001
monitoring
MemoryPoolMBean
getCollectionUsage/getusage004
isCollectionUsageThresholdExceeded/isexceeded003
isUsageThresholdExceeded
ThreadMXBean/ThreadInfo
stress/jni/gclocker
vm
compiler/jbe/subcommon/subcommon02
gc/containers/TreeMap_Arrays
mlvm
meth
func
java/throwException
jdi/breakpointOtherStratum
stress
compiler
deoptimize
i2c_c2i
sequences
gc/callSequencesDuringGC
java/sequences
jdi/breakpointInCompiledCode
mixed/stress/java/findDeadlock
jdk/java/awt/Color

@ -498,6 +498,7 @@ e1b3def126240d5433902f3cb0e91a4c27f6db50 jdk-11+18
9937ef7499dcd7673714517fd5e450410c14ba4e jdk-11+22
1edcf36fe15f79d6228d1a63eb680878e2386480 jdk-11+23
ea900a7dc7d77dee30865c60eabd87fc24b1037c jdk-11+24
331888ea4a788df801b1edf8836646cd25fc758b jdk-11+25
69b438908512d3dfef5852c6a843a5778333a309 jdk-12+2
990db216e7199b2ba9989d8fa20b657e0ca7d969 jdk-12+3
499b873761d8e8a1cc4aa649daf04cbe98cbce77 jdk-12+4

@ -1778,8 +1778,12 @@ void LIR_Assembler::emit_compare_and_swap(LIR_OpCompareAndSwap* op) {
#else
// FIXME: membar_release
__ membar(MacroAssembler::Membar_mask_bits(MacroAssembler::StoreStore | MacroAssembler::LoadStore), Rtemp);
Register addr = op->addr()->is_register() ?
op->addr()->as_pointer_register() :
op->addr()->as_address_ptr()->base()->as_pointer_register();
assert(op->addr()->is_register() || op->addr()->as_address_ptr()->disp() == 0, "unexpected disp");
assert(op->addr()->is_register() || op->addr()->as_address_ptr()->index() == LIR_OprDesc::illegalOpr(), "unexpected index");
if (op->code() == lir_cas_int || op->code() == lir_cas_obj) {
Register addr = op->addr()->as_register();
Register cmpval = op->cmp_value()->as_register();
Register newval = op->new_value()->as_register();
Register dest = op->result_opr()->as_register();
@ -1790,7 +1794,6 @@ void LIR_Assembler::emit_compare_and_swap(LIR_OpCompareAndSwap* op) {
__ mov(dest, 0, ne);
} else if (op->code() == lir_cas_long) {
assert(VM_Version::supports_cx8(), "wrong machine");
Register addr = op->addr()->as_pointer_register();
Register cmp_value_lo = op->cmp_value()->as_register_lo();
Register cmp_value_hi = op->cmp_value()->as_register_hi();
Register new_value_lo = op->new_value()->as_register_lo();
@ -3468,7 +3471,12 @@ void LIR_Assembler::peephole(LIR_List* lir) {
}
void LIR_Assembler::atomic_op(LIR_Code code, LIR_Opr src, LIR_Opr data, LIR_Opr dest, LIR_Opr tmp) {
#ifdef AARCH64
Register ptr = src->as_pointer_register();
#else
assert(src->is_address(), "sanity");
Address addr = as_Address(src->as_address_ptr());
#endif
if (code == lir_xchg) {
#ifdef AARCH64
@ -3493,15 +3501,15 @@ void LIR_Assembler::atomic_op(LIR_Code code, LIR_Opr src, LIR_Opr data, LIR_Opr
#ifdef AARCH64
__ ldaxr_w(dst, ptr);
#else
__ ldrex(dst, Address(ptr));
__ ldrex(dst, addr);
#endif
if (code == lir_xadd) {
Register tmp_reg = tmp->as_register();
if (data->is_constant()) {
assert_different_registers(dst, ptr, tmp_reg);
assert_different_registers(dst, tmp_reg);
__ add_32(tmp_reg, dst, data->as_constant_ptr()->as_jint());
} else {
assert_different_registers(dst, ptr, tmp_reg, data->as_register());
assert_different_registers(dst, tmp_reg, data->as_register());
__ add_32(tmp_reg, dst, data->as_register());
}
new_val = tmp_reg;
@ -3511,12 +3519,12 @@ void LIR_Assembler::atomic_op(LIR_Code code, LIR_Opr src, LIR_Opr data, LIR_Opr
} else {
new_val = data->as_register();
}
assert_different_registers(dst, ptr, new_val);
assert_different_registers(dst, new_val);
}
#ifdef AARCH64
__ stlxr_w(Rtemp, new_val, ptr);
#else
__ strex(Rtemp, new_val, Address(ptr));
__ strex(Rtemp, new_val, addr);
#endif // AARCH64
#ifdef AARCH64
@ -3551,7 +3559,7 @@ void LIR_Assembler::atomic_op(LIR_Code code, LIR_Opr src, LIR_Opr data, LIR_Opr
assert((dst_lo->encoding() & 0x1) == 0, "misaligned register pair");
__ bind(retry);
__ ldrexd(dst_lo, Address(ptr));
__ ldrexd(dst_lo, addr);
if (code == lir_xadd) {
Register tmp_lo = tmp->as_register_lo();
Register tmp_hi = tmp->as_register_hi();
@ -3562,7 +3570,7 @@ void LIR_Assembler::atomic_op(LIR_Code code, LIR_Opr src, LIR_Opr data, LIR_Opr
if (data->is_constant()) {
jlong c = data->as_constant_ptr()->as_jlong();
assert((jlong)((jint)c) == c, "overflow");
assert_different_registers(dst_lo, dst_hi, ptr, tmp_lo, tmp_hi);
assert_different_registers(dst_lo, dst_hi, tmp_lo, tmp_hi);
__ adds(tmp_lo, dst_lo, (jint)c);
__ adc(tmp_hi, dst_hi, 0);
} else {
@ -3570,18 +3578,18 @@ void LIR_Assembler::atomic_op(LIR_Code code, LIR_Opr src, LIR_Opr data, LIR_Opr
Register new_val_hi = data->as_register_hi();
__ adds(tmp_lo, dst_lo, new_val_lo);
__ adc(tmp_hi, dst_hi, new_val_hi);
assert_different_registers(dst_lo, dst_hi, ptr, tmp_lo, tmp_hi, new_val_lo, new_val_hi);
assert_different_registers(dst_lo, dst_hi, tmp_lo, tmp_hi, new_val_lo, new_val_hi);
}
new_val_lo = tmp_lo;
} else {
new_val_lo = data->as_register_lo();
Register new_val_hi = data->as_register_hi();
assert_different_registers(dst_lo, dst_hi, ptr, new_val_lo, new_val_hi);
assert_different_registers(dst_lo, dst_hi, new_val_lo, new_val_hi);
assert(new_val_hi->encoding() == new_val_lo->encoding() + 1, "non aligned register pair");
assert((new_val_lo->encoding() & 0x1) == 0, "misaligned register pair");
}
__ strexd(Rtemp, new_val_lo, Address(ptr));
__ strexd(Rtemp, new_val_lo, addr);
#endif // AARCH64
} else {
ShouldNotReachHere();

@ -3572,6 +3572,9 @@ void ClassFileParser::parse_classfile_attributes(const ClassFileStream* const cf
"Nest-host class_info_index %u has bad constant type in class file %s",
class_info_index, CHECK);
_nest_host = class_info_index;
} else {
// Unknown attribute
cfs->skip_u1(attribute_length, CHECK);
}
} else {
// Unknown attribute

@ -36,6 +36,10 @@
#include "utilities/defaultStream.hpp"
#include "utilities/vmError.hpp"
#ifdef _WINDOWS
#include <windows.h>
#endif
#ifdef SOLARIS
volatile bool NMT_stack_walkable = false;
#else
@ -49,28 +53,35 @@ MemBaseline MemTracker::_baseline;
Mutex* MemTracker::_query_lock = NULL;
bool MemTracker::_is_nmt_env_valid = true;
static const size_t buffer_size = 64;
NMT_TrackingLevel MemTracker::init_tracking_level() {
// Memory type is encoded into tracking header as a byte field,
// make sure that we don't overflow it.
STATIC_ASSERT(mt_number_of_types <= max_jubyte);
char nmt_env_variable[buffer_size];
jio_snprintf(nmt_env_variable, sizeof(nmt_env_variable), "NMT_LEVEL_%d", os::current_process_id());
const char* nmt_env_value;
#ifdef _WINDOWS
// Read the NMT environment variable from the PEB instead of the CRT
char value[buffer_size];
nmt_env_value = GetEnvironmentVariable(nmt_env_variable, value, (DWORD)sizeof(value)) != 0 ? value : NULL;
#else
nmt_env_value = ::getenv(nmt_env_variable);
#endif
NMT_TrackingLevel level = NMT_off;
char buf[64];
jio_snprintf(buf, sizeof(buf), "NMT_LEVEL_%d", os::current_process_id());
const char *nmt_option = ::getenv(buf);
if (nmt_option != NULL) {
if (strcmp(nmt_option, "summary") == 0) {
if (nmt_env_value != NULL) {
if (strcmp(nmt_env_value, "summary") == 0) {
level = NMT_summary;
} else if (strcmp(nmt_option, "detail") == 0) {
} else if (strcmp(nmt_env_value, "detail") == 0) {
level = NMT_detail;
} else if (strcmp(nmt_option, "off") != 0) {
// The option value is invalid
} else if (strcmp(nmt_env_value, "off") != 0) {
// The value of the environment variable is invalid
_is_nmt_env_valid = false;
}
// Remove the environment variable to avoid leaking to child processes
os::unsetenv(buf);
os::unsetenv(nmt_env_variable);
}
if (!MallocTracker::initialize(level) ||

@ -1,4 +1,4 @@
## libpng v1.6.34
## libpng v1.6.35
### libpng License
<pre>
@ -14,8 +14,8 @@ this sentence.
This code is released under the libpng license.
libpng versions 1.0.7, July 1, 2000 through 1.6.34, September 29, 2017 are
Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are
libpng versions 1.0.7, July 1, 2000 through 1.6.35, September 29, 2017 are
Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are
derived from libpng-1.0.6, and are distributed according to the same
disclaimer and license as libpng-1.0.6 with the following individuals
added to the list of Contributing Authors:

@ -497,8 +497,10 @@ reference_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data)
return nullptr;
error = FT_Load_Sfnt_Table (ft_face, tag, 0, buffer, &length);
if (error)
if (error) {
free (buffer);
return nullptr;
}
return hb_blob_create ((const char *) buffer, length,
HB_MEMORY_MODE_WRITABLE,

@ -193,8 +193,10 @@ _hb_ot_shaper_shape_plan_data_create (hb_shape_plan_t *shape_plan,
if (plan->shaper->data_create) {
plan->data = plan->shaper->data_create (plan);
if (unlikely (!plan->data))
if (unlikely (!plan->data)) {
free(plan);
return nullptr;
}
}
return plan;

@ -1,4 +1,3 @@
#if 0
CHANGES - changes for libpng
version 0.1 [March 29, 1995]
@ -1454,7 +1453,7 @@ Version 1.2.6beta4 [July 28, 2004]
sequential read support.
Added some "#if PNG_WRITE_SUPPORTED" blocks.
Added #ifdef to remove some redundancy in png_malloc_default().
Use png_malloc instead of png_zalloc to allocate the pallete.
Use png_malloc instead of png_zalloc to allocate the palette.
Version 1.0.16rc1 and 1.2.6rc1 [August 4, 2004]
Fixed buffer overflow vulnerability (CVE-2004-0597) in png_handle_tRNS().
@ -3259,7 +3258,7 @@ Version 1.5.2beta01 [February 13, 2011]
Revised PNG_EXPORTA macro to not use an empty parameter, to accommodate the
old VisualC++ preprocessor.
Turned on interlace handling in png_read_png().
Fixed gcc pendantic warnings.
Fixed gcc pedantic warnings.
Handle longjmp in Cygwin.
Fixed png_get_current_row_number() in the interlaced case.
Cleaned up ALPHA flags and transformations.
@ -3359,7 +3358,7 @@ Version 1.5.3beta05 [May 6, 2011]
Pass "" instead of '\0' to png_default_error() in png_err(). This mistake
was introduced in libpng-1.2.20beta01. This fixes CVE-2011-2691.
Added PNG_WRITE_OPTIMIZE_CMF_SUPPORTED macro to make the zlib "CMF" byte
optimization configureable.
optimization configurable.
IDAT compression failed if preceded by a compressed text chunk (bug
introduced in libpng-1.5.3beta01-02). This was because the attempt to
reset the zlib stream in png_write_IDAT happened after the first IDAT
@ -3643,7 +3642,7 @@ Version 1.5.6beta05 [October 12, 2011]
Fixed bug in png_write_chunk_header() debug print, introduced in 1.5.6beta01.
Version 1.5.6beta06 [October 17, 2011]
Removed two redundant tests for unitialized row.
Removed two redundant tests for uninitialized row.
Fixed a relatively harmless memory overwrite in compressed text writing
with a 1 byte zlib buffer.
Add ability to call png_read_update_info multiple times to pngvalid.c.
@ -3689,7 +3688,7 @@ Version 1.5.7beta01 [November 4, 2011]
crash. The pngmem.c implementation of png_malloc() included a cast
to png_size_t which would fail on large allocations on 16-bit systems.
Fix for the preprocessor of the Intel C compiler. The preprocessor
splits adjacent @ signs with a space; this changes the concatentation
splits adjacent @ signs with a space; this changes the concatenation
token from @-@-@ to PNG_JOIN; that should work with all compiler
preprocessors.
Paeth filter speed improvements from work by Siarhei Siamashka. This
@ -3735,7 +3734,7 @@ Version 1.5.7beta03 [November 17, 2011]
gray (on palette) itself.
Fixes for C++ compilation using g++ When libpng source is compiled
using g++. The compiler imposes C++ rules on the C source; thus it
is desireable to make the source work with either C or C++ rules
is desirable to make the source work with either C or C++ rules
without throwing away useful error information. This change adds
png_voidcast to allow C semantic (void*) cases or the corresponding
C++ static_cast operation, as appropriate.
@ -4053,7 +4052,7 @@ Version 1.6.0beta16 [March 6, 2012]
(in fact this is harmless, but the PNG data produced may be sub-optimal).
Version 1.6.0beta17 [March 10, 2012]
Fixed PNG_LIBPNG_BUILD_BASE_TYPE definition.
Fixed PNG_LIBPNG_BUILD_BASE_TYPE definition.
Reject all iCCP chunks after the first, even if the first one is invalid.
Deflate/inflate was reworked to move common zlib calls into single
functions [rw]util.c. A new shared keyword check routine was also added
@ -4061,7 +4060,7 @@ Version 1.6.0beta17 [March 10, 2012]
possible to call png_inflate() incrementally. A warning is no longer
issued if the language tag or translated keyword in the iTXt chunk
has zero length.
If benign errors are disabled use maximum window on ancilliary inflate.
If benign errors are disabled use maximum window on ancillary inflate.
This works round a bug introduced in 1.5.4 where compressed ancillary
chunks could end up with a too-small windowBits value in the deflate
header.
@ -4176,7 +4175,7 @@ Version 1.6.0beta27 [August 11, 2012]
declared even though the functions are never actually defined. This
change provides a dummy definition so that the declarations work, yet any
implementation will fail to compile because of an incomplete type.
Re-eliminated the use of strcpy() in pngtest.c. An unncessary use of
Re-eliminated the use of strcpy() in pngtest.c. An unnecessary use of
strcpy() was accidentally re-introduced in libpng16; this change replaces
it with strncpy().
Eliminated use of png_sizeof(); use sizeof() instead.
@ -4309,7 +4308,7 @@ Version 1.6.0beta31 [November 1, 2012]
resulting in VS2010 having to update the files.
Removed non-working ICC profile support code that was mostly added to
libpng-1.6.0beta29 and beta30. There was too much code for too little
gain; implementing full ICC color correction may be desireable but is left
gain; implementing full ICC color correction may be desirable but is left
up to applications.
Version 1.6.0beta32 [November 25, 2012]
@ -4592,7 +4591,7 @@ Version 1.6.3beta07 [June 8, 2013]
the optimizations ('check' vs 'api') are exposed in the public header files
except that the new setting PNG_ARM_NEON_OPT documents how libpng makes the
decision about whether or not to use the optimizations.
Protect symbol prefixing against CC/CPPFLAGS/CFLAGS useage.
Protect symbol prefixing against CC/CPPFLAGS/CFLAGS usage.
Previous iOS/Xcode fixes for the ARM NEON optimizations moved the test
on __ARM_NEON__ from configure time to compile time. This breaks symbol
prefixing because the definition of the special png_init_filter_functions
@ -4963,7 +4962,7 @@ Version 1.6.13beta01 [July 4, 2014]
Changed "if defined(__ARM_NEON__)" to
"if (defined(__ARM_NEON__) || defined(__ARM_NEON))" (James Wu).
Fixed clang no-warning builds: png_digit was defined but never used.
Version 1.6.13beta02 [July 21, 2014]
Fixed an incorrect separator ("/" should be "\") in scripts/makefile.vcwin32
(bug report from Wolfgang S. Kechel). Bug was introduced in libpng-1.6.11.
@ -5454,7 +5453,7 @@ Version 1.6.21beta01 [December 11, 2015]
Version 1.6.21beta02 [December 14, 2015]
Moved png_check_keyword() from pngwutil.c to pngset.c
Removed LE/BE dependencies in pngvalid, to 'fix' the current problem
in the BigEndian tests by not testing it, making the BE code the same
in the BigEndian tests by not testing it, making the BE code the same
as the LE version.
Fixes to pngvalid for various reduced build configurations (eliminate unused
statics) and a fix for the case in rgb_to_gray when the digitize option
@ -5518,7 +5517,7 @@ Version 1.6.22beta03 [March 9, 2016]
Added a common-law trademark notice and export control information
to the LICENSE file, png.h, and the man page.
Restored "& 0xff" in png_save_uint_16() and png_save_uint_32() that
were accidentally removed from libpng-1.6.17.
were accidentally removed from libpng-1.6.17.
Changed PNG_INFO_cHNK and PNG_FREE_cHNK from 0xnnnn to 0xnnnnU in png.h
(Robert C. Seacord).
Removed dubious "#if INT_MAX" test from png.h that was added to
@ -5635,7 +5634,7 @@ Version 1.6.24beta02 [June 23, 2016]
to All and adds a list of the warnings that need to be turned off. This is
semi-documentary; the intent is to tell libpng users which warnings have
been examined and judged non-fixable at present. The warning about
structure padding is fixable, but it would be a signficant change (moving
structure padding is fixable, but it would be a significant change (moving
structure members around).
Version 1.6.24beta03 [July 4, 2016]
@ -5781,7 +5780,7 @@ Version 1.6.28rc01 [January 3, 2017]
Added option to Cmake build allowing a custom location of zlib to be
specified in a scenario where libpng is being built as a subproject
alongside zlib by another project (Sam Serrels).
Changed png_ptr->options from a png_byte to png_uint_32, to accomodate
Changed png_ptr->options from a png_byte to png_uint_32, to accommodate
up to 16 options.
Version 1.6.28rc02 [January 4, 2017]
@ -5932,7 +5931,7 @@ Version 1.6.32beta04 [August 2, 2017]
Update libpng.3 and libpng-manual.txt about eXIf functions.
Version 1.6.32beta05 [August 2, 2017]
Restored png_get_eXIf() and png_set_eXIf() to maintain API compatability.
Restored png_get_eXIf() and png_set_eXIf() to maintain API compatibility.
Version 1.6.32beta06 [August 2, 2017]
Removed png_get_eXIf_1() and png_set_eXIf_1().
@ -5951,7 +5950,7 @@ Version 1.6.32beta09 [August 3, 2017]
Require cmake-2.8.8 in CMakeLists.txt. Revised symlink creation,
no longer using deprecated cmake LOCATION feature (Clifford Yapp).
Fixed five-byte error in the calculation of IDAT maximum possible size.
Version 1.6.32beta10 [August 5, 2017]
Moved chunk-length check into a png_check_chunk_length() private
function (Suggested by Max Stepin).
@ -6038,14 +6037,35 @@ Version 1.6.33 [September 28, 2017]
Add end_info structure and png_read_end() to the libpng fuzzer.
Version 1.6.34 [September 29, 2017]
Removed contrib/pngsuite/i*.png; some of these were incorrect and caused
test failures.
Removed contrib/pngsuite/i*.png; some of them caused test failures.
Version 1.6.35beta01 [March 6, 2018]
Restored 21 of the contrib/pngsuite/i*.png, which do not cause test
failures. Placed the remainder in contrib/pngsuite/interlaced/i*.png.
Added calls to png_set_*() transforms commonly used by browsers to
the fuzzer.
Removed some unnecessary brackets in pngrtran.c
Fixed miscellaneous typos (Patch by github user "luzpaz").
Change "ASM C" to "C ASM" in CMakeLists.txt
Fixed incorrect handling of bKGD chunk in sub-8-bit files (Cosmin)
Added hardware optimization directories to zip and 7z distributions.
Fixed incorrect bitmask for options.
Fixed many spelling typos.
Version 1.6.35beta02 [March 28, 2018]
Make png_get_iCCP consistent with man page (allow compression-type argument
to be NULL, bug report by Lenard Szolnoki).
Version 1.6.35 [July 15, 2018]
Replaced the remaining uses of png_size_t with size_t (Cosmin)
Fixed the calculation of row_factor in png_check_chunk_length
(reported by Thuan Pham in SourceForge issue #278)
Added missing parentheses to a macro definition
(suggested by "irwir" in GitHub issue #216)
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
to subscribe)
or to glennrp at users.sourceforge.net
to subscribe).
Glenn R-P
#endif

@ -10,8 +10,8 @@ this sentence.
This code is released under the libpng license.
libpng versions 1.0.7, July 1, 2000 through 1.6.34, September 29, 2017 are
Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are
libpng versions 1.0.7, July 1, 2000 through 1.6.35, July 15, 2018 are
Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are
derived from libpng-1.0.6, and are distributed according to the same
disclaimer and license as libpng-1.0.6 with the following individuals
added to the list of Contributing Authors:
@ -130,4 +130,4 @@ any encryption software. See the EAR, paragraphs 734.3(b)(3) and
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
September 29, 2017
July 15, 2018

@ -1,4 +1,4 @@
README for libpng version 1.6.34 - September 29, 2017 (shared library 16.0)
README for libpng version 1.6.35 - July 15, 2018 (shared library 16.0)
See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng.
@ -118,7 +118,7 @@ development group.
Send comments/corrections/commendations to png-mng-implement at
lists.sourceforge.net (subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
to subscribe) or to glennrp at users.sourceforge.net
to subscribe).
You can't reach Guy, the original libpng author, at the addresses
given in previous versions of this document. He and Andreas will

@ -0,0 +1,49 @@
Updating libpng in OpenJDK
1) Update the src/java.desktop/share/legal/libpng.md file.
Usually this is just a matter of updating the version at the top,
and in the embedded text, and extending the copyright date.
The updated info comes from the LICENSE file.
2) Copy LICENSE, README, and CHANGES from the new version into OpenJDK's
libpng source directory
3) OpenJDK includes just a subset of the files, since we use it only for reading.
Copy only the same .c and .h files as are already there and re-apply the
GPL v2 + CP header to all the updated files. These files also have a special
note referencing the previous license. Restore everything as it was.
You can either do this with a clever-enough script, or manually copy/paste.
There are 18 files to update so either is do-able.
4) Special and careful handling of pnglibconf.h
OpenJDK has a heavily modified copy of pnglibconf.h.
This is the trickiest part of the whole exercise.
This file is generated by png at build time.
Except for the dates and version, you should generally not need to update
OpenJDK's copy unless the new version of PNG has added rquired new #defines
that cause problems building.
You can run configure && make on the downloaded source and compare but we
do not want to enable any of the WRITE support, and there are many more
modifications as well.
So do NOT just copy in a file from the new libpng.
The header may be the only thing you want to update.
Also this file has a special "THIS FILE WAS MODIFIED BY ORACLE, INC."
line in the GPL header.
So lots of reasons to not copy over the new version,
and instead just tweak the existing one.
5) Run scripts to expand tabs and remove trailing white space from source files.
Use expand to remove tabs
expand ${f} > ${f}.tmp
mv ${f}.tmp $f
Use sed to remove trailing white space
sed -e 's/[ ]* $//' ${f} > ${f}.tmp
mv ${f}.tmp $f
6) As with all native code, run it through the official build systems, in case
the updated code trigger any fatal warnings with the official compilers.
7) Run the splashscreen jtreg tests.

@ -29,8 +29,8 @@
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
*
* Last changed in libpng 1.6.33 [September 28, 2017]
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* Last changed in libpng 1.6.35 [July 15, 2018]
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@ -42,7 +42,7 @@
#include "pngpriv.h"
/* Generate a compiler error if there is an old png.h in the search path. */
typedef png_libpng_version_1_6_34 Your_png_h_is_not_version_1_6_34;
typedef png_libpng_version_1_6_35 Your_png_h_is_not_version_1_6_35;
#ifdef __GNUC__
/* The version tests may need to be added to, but the problem warning has
@ -99,7 +99,7 @@ png_set_sig_bytes(png_structrp png_ptr, int num_bytes)
* PNG signature (this is the same behavior as strcmp, memcmp, etc).
*/
int PNGAPI
png_sig_cmp(png_const_bytep sig, png_size_t start, png_size_t num_to_check)
png_sig_cmp(png_const_bytep sig, size_t start, size_t num_to_check)
{
png_byte png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10};
@ -164,7 +164,7 @@ png_reset_crc(png_structrp png_ptr)
* trouble of calculating it.
*/
void /* PRIVATE */
png_calculate_crc(png_structrp png_ptr, png_const_bytep ptr, png_size_t length)
png_calculate_crc(png_structrp png_ptr, png_const_bytep ptr, size_t length)
{
int need_crc = 1;
@ -449,7 +449,7 @@ png_destroy_info_struct(png_const_structrp png_ptr, png_infopp info_ptr_ptr)
* those cases where it does anything other than a memset.
*/
PNG_FUNCTION(void,PNGAPI
png_info_init_3,(png_infopp ptr_ptr, png_size_t png_info_struct_size),
png_info_init_3,(png_infopp ptr_ptr, size_t png_info_struct_size),
PNG_DEPRECATED)
{
png_inforp info_ptr = *ptr_ptr;
@ -844,15 +844,15 @@ png_get_copyright(png_const_structrp png_ptr)
#else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
"libpng version 1.6.34 - September 29, 2017" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson" \
"libpng version 1.6.35 - July 15, 2018" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson" \
PNG_STRING_NEWLINE \
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
PNG_STRING_NEWLINE;
# else
return "libpng version 1.6.34 - September 29, 2017\
Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson\
return "libpng version 1.6.35 - July 15, 2018\
Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
# endif
@ -970,7 +970,7 @@ png_handle_as_unknown(png_const_structrp png_ptr, png_const_bytep chunk_name)
/* The code is the fifth byte after each four byte string. Historically this
* code was always searched from the end of the list, this is no longer
* necessary because the 'set' routine handles duplicate entries correcty.
* necessary because the 'set' routine handles duplicate entries correctly.
*/
do /* num_chunk_list > 0, so at least one */
{
@ -2095,7 +2095,7 @@ png_icc_check_header(png_const_structrp png_ptr, png_colorspacerp colorspace,
*/
/* Data checks (could be skipped). These checks must be independent of the
* version number; however, the version number doesn't accomodate changes in
* version number; however, the version number doesn't accommodate changes in
* the header fields (just the known tags and the interpretation of the
* data.)
*/
@ -2735,7 +2735,7 @@ png_check_IHDR(png_const_structrp png_ptr,
#if defined(PNG_sCAL_SUPPORTED) || defined(PNG_pCAL_SUPPORTED)
/* ASCII to fp functions */
/* Check an ASCII formated floating point value, see the more detailed
/* Check an ASCII formatted floating point value, see the more detailed
* comments in pngpriv.h
*/
/* The following is used internally to preserve the sticky flags */
@ -2743,11 +2743,11 @@ png_check_IHDR(png_const_structrp png_ptr,
#define png_fp_set(state, value) ((state) = (value) | ((state) & PNG_FP_STICKY))
int /* PRIVATE */
png_check_fp_number(png_const_charp string, png_size_t size, int *statep,
png_check_fp_number(png_const_charp string, size_t size, int *statep,
png_size_tp whereami)
{
int state = *statep;
png_size_t i = *whereami;
size_t i = *whereami;
while (i < size)
{
@ -2870,10 +2870,10 @@ PNG_FP_End:
/* The same but for a complete string. */
int
png_check_fp_string(png_const_charp string, png_size_t size)
png_check_fp_string(png_const_charp string, size_t size)
{
int state=0;
png_size_t char_index=0;
size_t char_index=0;
if (png_check_fp_number(string, size, &state, &char_index) != 0 &&
(char_index == size || string[char_index] == 0))
@ -2934,7 +2934,7 @@ png_pow10(int power)
#pragma GCC diagnostic warning "-Wstrict-overflow=2"
#endif /* GCC_STRICT_OVERFLOW */
void /* PRIVATE */
png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, png_size_t size,
png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, size_t size,
double fp, unsigned int precision)
{
/* We use standard functions from math.h, but not printf because
@ -3265,7 +3265,7 @@ png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, png_size_t size,
*/
void /* PRIVATE */
png_ascii_from_fixed(png_const_structrp png_ptr, png_charp ascii,
png_size_t size, png_fixed_point fp)
size_t size, png_fixed_point fp)
{
/* Require space for 10 decimal digits, a decimal point, a minus sign and a
* trailing \0, 13 characters:
@ -4372,7 +4372,7 @@ png_set_option(png_structrp png_ptr, int option, int onoff)
png_uint_32 setting = (2U + (onoff != 0)) << option;
png_uint_32 current = png_ptr->options;
png_ptr->options = (png_uint_32)(((current & ~mask) | setting) & 0xff);
png_ptr->options = (png_uint_32)((current & ~mask) | setting);
return (int)(current & mask) >> option;
}

@ -29,9 +29,9 @@
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
*
* libpng version 1.6.34, September 29, 2017
* libpng version 1.6.35, July 15, 2018
*
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@ -40,7 +40,7 @@
* Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
* libpng versions 0.97, January 1998, through 1.6.34, September 29, 2017:
* libpng versions 0.97, January 1998, through 1.6.35, July 15, 2018:
* Glenn Randers-Pehrson.
* See also "Contributing Authors", below.
*/
@ -53,8 +53,8 @@
*
* This code is released under the libpng license.
*
* libpng versions 1.0.7, July 1, 2000 through 1.6.34, September 29, 2017 are
* Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are
* libpng versions 1.0.7, July 1, 2000 through 1.6.35, July 15, 2018 are
* Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are
* derived from libpng-1.0.6, and are distributed according to the same
* disclaimer and license as libpng-1.0.6 with the following individuals
* added to the list of Contributing Authors:
@ -241,7 +241,7 @@
* ...
* 1.5.30 15 10527 15.so.15.30[.0]
* ...
* 1.6.34 16 10633 16.so.16.34[.0]
* 1.6.35 16 10635 16.so.16.35[.0]
*
* Henceforth the source version will match the shared-library major
* and minor numbers; the shared-library major version number will be
@ -269,13 +269,13 @@
* Y2K compliance in libpng:
* =========================
*
* September 29, 2017
* July 15, 2018
*
* Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration.
*
* This is your unofficial assurance that libpng from version 0.71 and
* upward through 1.6.34 are Y2K compliant. It is my belief that
* upward through 1.6.35 are Y2K compliant. It is my belief that
* earlier versions were also Y2K compliant.
*
* Libpng only has two year fields. One is a 2-byte unsigned integer
@ -337,8 +337,8 @@
*/
/* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.6.34"
#define PNG_HEADER_VERSION_STRING " libpng version 1.6.34 - September 29, 2017\n"
#define PNG_LIBPNG_VER_STRING "1.6.35"
#define PNG_HEADER_VERSION_STRING " libpng version 1.6.35 - July 15, 2018\n"
#define PNG_LIBPNG_VER_SONUM 16
#define PNG_LIBPNG_VER_DLLNUM 16
@ -346,13 +346,13 @@
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
#define PNG_LIBPNG_VER_MAJOR 1
#define PNG_LIBPNG_VER_MINOR 6
#define PNG_LIBPNG_VER_RELEASE 34
#define PNG_LIBPNG_VER_RELEASE 35
/* This should match the numeric part of the final component of
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
*/
#define PNG_LIBPNG_VER_BUILD 0
#define PNG_LIBPNG_VER_BUILD 02
/* Release Status */
#define PNG_LIBPNG_BUILD_ALPHA 1
@ -369,7 +369,7 @@
#define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with
PNG_LIBPNG_BUILD_PRIVATE */
#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_STABLE
#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_BETA
/* Careful here. At one time, Guy wanted to use 082, but that would be octal.
* We must not include leading zeros.
@ -377,7 +377,7 @@
* version 1.0.0 was mis-numbered 100 instead of 10000). From
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
*/
#define PNG_LIBPNG_VER 10634 /* 1.6.34 */
#define PNG_LIBPNG_VER 10635 /* 1.6.35 */
/* Library configuration: these options cannot be changed after
* the library has been built.
@ -487,7 +487,7 @@ extern "C" {
/* This triggers a compiler error in png.c, if png.c and png.h
* do not agree upon the version number.
*/
typedef char* png_libpng_version_1_6_34;
typedef char* png_libpng_version_1_6_35;
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
*
@ -628,8 +628,8 @@ typedef struct png_text_struct
png_charp key; /* keyword, 1-79 character description of "text" */
png_charp text; /* comment, may be an empty string (ie "")
or a NULL pointer */
png_size_t text_length; /* length of the text string */
png_size_t itxt_length; /* length of the itxt string */
size_t text_length; /* length of the text string */
size_t itxt_length; /* length of the itxt string */
png_charp lang; /* language code, 0-79 characters
or a NULL pointer */
png_charp lang_key; /* keyword translated UTF-8 string, 0 or more
@ -682,7 +682,7 @@ typedef struct png_unknown_chunk_t
{
png_byte name[5]; /* Textual chunk name with '\0' terminator */
png_byte *data; /* Data, should not be modified on read! */
png_size_t size;
size_t size;
/* On write 'location' must be set using the flag values listed below.
* Notice that on read it is set by libpng however the values stored have
@ -707,7 +707,7 @@ typedef png_unknown_chunk * * png_unknown_chunkpp;
/* Maximum positive integer used in PNG is (2^31)-1 */
#define PNG_UINT_31_MAX ((png_uint_32)0x7fffffffL)
#define PNG_UINT_32_MAX ((png_uint_32)(-1))
#define PNG_SIZE_MAX ((png_size_t)(-1))
#define PNG_SIZE_MAX ((size_t)(-1))
/* These are constants for fixed point values encoded in the
* PNG specification manner (x100000)
@ -813,7 +813,7 @@ typedef png_unknown_chunk * * png_unknown_chunkpp;
typedef struct png_row_info_struct
{
png_uint_32 width; /* width of row */
png_size_t rowbytes; /* number of bytes in row */
size_t rowbytes; /* number of bytes in row */
png_byte color_type; /* color type of row */
png_byte bit_depth; /* bit depth of row */
png_byte channels; /* number of channels (1, 2, 3, or 4) */
@ -832,7 +832,7 @@ typedef png_row_info * * png_row_infopp;
* expected to return the read data in the buffer.
*/
typedef PNG_CALLBACK(void, *png_error_ptr, (png_structp, png_const_charp));
typedef PNG_CALLBACK(void, *png_rw_ptr, (png_structp, png_bytep, png_size_t));
typedef PNG_CALLBACK(void, *png_rw_ptr, (png_structp, png_bytep, size_t));
typedef PNG_CALLBACK(void, *png_flush_ptr, (png_structp));
typedef PNG_CALLBACK(void, *png_read_status_ptr, (png_structp, png_uint_32,
int));
@ -969,8 +969,8 @@ PNG_EXPORT(2, void, png_set_sig_bytes, (png_structrp png_ptr, int num_bytes));
* signature, and non-zero otherwise. Having num_to_check == 0 or
* start > 7 will always fail (ie return non-zero).
*/
PNG_EXPORT(3, int, png_sig_cmp, (png_const_bytep sig, png_size_t start,
png_size_t num_to_check));
PNG_EXPORT(3, int, png_sig_cmp, (png_const_bytep sig, size_t start,
size_t num_to_check));
/* Simple signature checking function. This is the same as calling
* png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n).
@ -989,11 +989,11 @@ PNG_EXPORTA(5, png_structp, png_create_write_struct,
png_error_ptr warn_fn),
PNG_ALLOCATED);
PNG_EXPORT(6, png_size_t, png_get_compression_buffer_size,
PNG_EXPORT(6, size_t, png_get_compression_buffer_size,
(png_const_structrp png_ptr));
PNG_EXPORT(7, void, png_set_compression_buffer_size, (png_structrp png_ptr,
png_size_t size));
size_t size));
/* Moved from pngconf.h in 1.4.0 and modified to ensure setjmp/longjmp
* match up.
@ -1046,7 +1046,7 @@ PNG_EXPORT(13, void, png_write_sig, (png_structrp png_ptr));
/* Write a PNG chunk - size, type, (optional) data, CRC. */
PNG_EXPORT(14, void, png_write_chunk, (png_structrp png_ptr, png_const_bytep
chunk_name, png_const_bytep data, png_size_t length));
chunk_name, png_const_bytep data, size_t length));
/* Write the start of a PNG chunk - length and chunk name. */
PNG_EXPORT(15, void, png_write_chunk_start, (png_structrp png_ptr,
@ -1054,7 +1054,7 @@ PNG_EXPORT(15, void, png_write_chunk_start, (png_structrp png_ptr,
/* Write the data of a PNG chunk started with png_write_chunk_start(). */
PNG_EXPORT(16, void, png_write_chunk_data, (png_structrp png_ptr,
png_const_bytep data, png_size_t length));
png_const_bytep data, size_t length));
/* Finish a chunk started with png_write_chunk_start() (includes CRC). */
PNG_EXPORT(17, void, png_write_chunk_end, (png_structrp png_ptr));
@ -1068,7 +1068,7 @@ PNG_EXPORTA(18, png_infop, png_create_info_struct, (png_const_structrp png_ptr),
* the API will be removed in the future.
*/
PNG_EXPORTA(19, void, png_info_init_3, (png_infopp info_ptr,
png_size_t png_info_struct_size), PNG_DEPRECATED);
size_t png_info_struct_size), PNG_DEPRECATED);
/* Writes all the PNG information before the image. */
PNG_EXPORT(20, void, png_write_info_before_PLTE,
@ -1165,7 +1165,7 @@ PNG_EXPORT(35, void, png_build_grayscale_palette, (int bit_depth,
* corresponding composited pixel, and the color channels are unassociated
* (not premultiplied). The gamma encoded color channels must be scaled
* according to the contribution and to do this it is necessary to undo
* the encoding, scale the color values, perform the composition and reencode
* the encoding, scale the color values, perform the composition and re-encode
* the values. This is the 'PNG' mode.
*
* The alternative is to 'associate' the alpha with the color information by
@ -1221,7 +1221,7 @@ PNG_FIXED_EXPORT(228, void, png_set_alpha_mode_fixed, (png_structrp png_ptr,
*
* png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_GAMMA_MAC);
* In this case the output is assumed to be something like an sRGB conformant
* display preceeded by a power-law lookup table of power 1.45. This is how
* display preceded by a power-law lookup table of power 1.45. This is how
* early Mac systems behaved.
*
* png_set_alpha_mode(pp, PNG_ALPHA_STANDARD, PNG_GAMMA_LINEAR);
@ -1268,7 +1268,7 @@ PNG_FIXED_EXPORT(228, void, png_set_alpha_mode_fixed, (png_structrp png_ptr,
*
* When the default gamma of PNG files doesn't match the output gamma.
* If you have PNG files with no gamma information png_set_alpha_mode allows
* you to provide a default gamma, but it also sets the ouput gamma to the
* you to provide a default gamma, but it also sets the output gamma to the
* matching value. If you know your PNG files have a gamma that doesn't
* match the output you can take advantage of the fact that
* png_set_alpha_mode always sets the output gamma but only sets the PNG
@ -1719,7 +1719,7 @@ PNG_EXPORT(218, png_byte, png_get_current_pass_number, (png_const_structrp));
* chunk will cause an error at this point unless it is to be saved.
* positive: The chunk was handled, libpng will ignore/discard it.
*
* See "INTERACTION WTIH USER CHUNK CALLBACKS" below for important notes about
* See "INTERACTION WITH USER CHUNK CALLBACKS" below for important notes about
* how this behavior will change in libpng 1.7
*/
PNG_EXPORT(88, void, png_set_read_user_chunk_fn, (png_structrp png_ptr,
@ -1744,7 +1744,7 @@ PNG_EXPORT(91, png_voidp, png_get_progressive_ptr,
/* Function to be called when data becomes available */
PNG_EXPORT(92, void, png_process_data, (png_structrp png_ptr,
png_inforp info_ptr, png_bytep buffer, png_size_t buffer_size));
png_inforp info_ptr, png_bytep buffer, size_t buffer_size));
/* A function which may be called *only* within png_process_data to stop the
* processing of any more data. The function returns the number of bytes
@ -1753,7 +1753,7 @@ PNG_EXPORT(92, void, png_process_data, (png_structrp png_ptr,
* 'save' is set to true the routine will first save all the pending data and
* will always return 0.
*/
PNG_EXPORT(219, png_size_t, png_process_data_pause, (png_structrp, int save));
PNG_EXPORT(219, size_t, png_process_data_pause, (png_structrp, int save));
/* A function which may be called *only* outside (after) a call to
* png_process_data. It returns the number of bytes of data to skip in the
@ -1898,7 +1898,7 @@ PNG_EXPORT(110, png_uint_32, png_get_valid, (png_const_structrp png_ptr,
png_const_inforp info_ptr, png_uint_32 flag));
/* Returns number of bytes needed to hold a transformed row. */
PNG_EXPORT(111, png_size_t, png_get_rowbytes, (png_const_structrp png_ptr,
PNG_EXPORT(111, size_t, png_get_rowbytes, (png_const_structrp png_ptr,
png_const_inforp info_ptr));
#ifdef PNG_INFO_IMAGE_SUPPORTED
@ -2267,7 +2267,7 @@ PNG_EXPORT(171, void, png_set_sCAL_s, (png_const_structrp png_ptr,
* to specifying "NEVER", however when "AS_DEFAULT" is used for specific chunks
* it simply resets the behavior to the libpng default.
*
* INTERACTION WTIH USER CHUNK CALLBACKS:
* INTERACTION WITH USER CHUNK CALLBACKS:
* The per-chunk handling is always used when there is a png_user_chunk_ptr
* callback and the callback returns 0; the chunk is then always stored *unless*
* it is critical and the per-chunk setting is other than ALWAYS. Notice that
@ -2686,7 +2686,7 @@ PNG_EXPORT(243, int, png_get_palette_max, (png_const_structp png_ptr,
* The simplified API hides the details of both libpng and the PNG file format
* itself. It allows PNG files to be read into a very limited number of
* in-memory bitmap formats or to be written from the same formats. If these
* formats do not accomodate your needs then you can, and should, use the more
* formats do not accommodate your needs then you can, and should, use the more
* sophisticated APIs above - these support a wide variety of in-memory formats
* and a wide variety of sophisticated transformations to those formats as well
* as a wide variety of APIs to manipulate ancillary information.
@ -3048,7 +3048,7 @@ PNG_EXPORT(235, int, png_image_begin_read_from_stdio, (png_imagep image,
#endif /* STDIO */
PNG_EXPORT(236, int, png_image_begin_read_from_memory, (png_imagep image,
png_const_voidp memory, png_size_t size));
png_const_voidp memory, size_t size));
/* The PNG header is read from the given memory buffer. */
PNG_EXPORT(237, int, png_image_finish_read, (png_imagep image,
@ -3161,7 +3161,7 @@ PNG_EXPORT(245, int, png_image_write_to_memory, (png_imagep image, void *memory,
* than or equal to the original value.
*
* If the function returns false and *memory_bytes was not changed an error
* occured during write. If *memory_bytes was changed, or is not 0 if
* occurred during write. If *memory_bytes was changed, or is not 0 if
* 'memory' was NULL, the write would have succeeded but for the memory
* buffer being too small. *memory_bytes contains the required number of
* bytes and will be bigger that the original value.
@ -3245,7 +3245,7 @@ PNG_EXPORT(245, int, png_image_write_to_memory, (png_imagep image, void *memory,
* option and 'onoff' is 0 (off) or non-0 (on). The value returned is given
* by the PNG_OPTION_ defines below.
*
* HARDWARE: normally hardware capabilites, such as the Intel SSE instructions,
* HARDWARE: normally hardware capabilities, such as the Intel SSE instructions,
* are detected at run time, however sometimes it may be impossible
* to do this in user mode, in which case it is necessary to discover
* the capabilities in an OS specific way. Such capabilities are

@ -29,9 +29,9 @@
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
*
* libpng version 1.6.34, September 29, 2017
* libpng version 1.6.35, July 15, 2018
*
* Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
* Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@ -155,7 +155,7 @@
*
* These cases only differ if the operating system does not use the C
* calling convention, at present this just means the above cases
* (x86 DOS/Windows sytems) and, even then, this does not apply to
* (x86 DOS/Windows systems) and, even then, this does not apply to
* Cygwin running on those systems.
*
* Note that the value must be defined in pnglibconf.h so that what
@ -543,8 +543,10 @@
# error "libpng requires an unsigned 32-bit (or more) type"
#endif
/* Prior to 1.6.0 it was possible to disable the use of size_t, 1.6.0, however,
* requires an ISOC90 compiler and relies on consistent behavior of sizeof.
/* Prior to 1.6.0, it was possible to disable the use of size_t and ptrdiff_t.
* From 1.6.0 onwards, an ISO C90 compiler, as well as a standard-compliant
* behavior of sizeof and ptrdiff_t are required.
* The legacy typedefs are provided here for backwards compatibility.
*/
typedef size_t png_size_t;
typedef ptrdiff_t png_ptrdiff_t;
@ -565,13 +567,12 @@ typedef ptrdiff_t png_ptrdiff_t;
# endif
#endif
/* png_alloc_size_t is guaranteed to be no smaller than png_size_t, and no
* smaller than png_uint_32. Casts from png_size_t or png_uint_32 to
* png_alloc_size_t are not necessary; in fact, it is recommended not to use
* them at all so that the compiler can complain when something turns out to be
* problematic.
/* png_alloc_size_t is guaranteed to be no smaller than size_t, and no smaller
* than png_uint_32. Casts from size_t or png_uint_32 to png_alloc_size_t are
* not necessary; in fact, it is recommended not to use them at all, so that
* the compiler can complain when something turns out to be problematic.
*
* Casts in the other direction (from png_alloc_size_t to png_size_t or
* Casts in the other direction (from png_alloc_size_t to size_t or
* png_uint_32) should be explicitly applied; however, we do not expect to
* encounter practical situations that require such conversions.
*
@ -581,7 +582,7 @@ typedef ptrdiff_t png_ptrdiff_t;
#ifdef PNG_SMALL_SIZE_T
typedef png_uint_32 png_alloc_size_t;
#else
typedef png_size_t png_alloc_size_t;
typedef size_t png_alloc_size_t;
#endif
/* Prior to 1.6.0 libpng offered limited support for Microsoft C compiler
@ -617,8 +618,8 @@ typedef char * png_charp;
typedef const char * png_const_charp;
typedef png_fixed_point * png_fixed_point_p;
typedef const png_fixed_point * png_const_fixed_point_p;
typedef png_size_t * png_size_tp;
typedef const png_size_t * png_const_size_tp;
typedef size_t * png_size_tp;
typedef const size_t * png_const_size_tp;
#ifdef PNG_STDIO_SUPPORTED
typedef FILE * png_FILE_p;

@ -29,8 +29,8 @@
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
*
* Last changed in libpng 1.6.32 [August 24, 2017]
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* Last changed in libpng 1.6.35 [July 15, 2018]
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@ -54,7 +54,7 @@ png_get_valid(png_const_structrp png_ptr, png_const_inforp info_ptr,
return(0);
}
png_size_t PNGAPI
size_t PNGAPI
png_get_rowbytes(png_const_structrp png_ptr, png_const_inforp info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
@ -395,7 +395,7 @@ png_get_y_pixels_per_inch(png_const_structrp png_ptr, png_const_inforp info_ptr)
static png_fixed_point
png_fixed_inches_from_microns(png_const_structrp png_ptr, png_int_32 microns)
{
/* Convert from metres * 1,000,000 to inches * 100,000, meters to
/* Convert from meters * 1,000,000 to inches * 100,000, meters to
* inches is simply *(100/2.54), so we want *(10/2.54) == 500/127.
* Notice that this can overflow - a warning is output and 0 is
* returned.
@ -769,8 +769,7 @@ png_get_iCCP(png_const_structrp png_ptr, png_inforp info_ptr,
if (png_ptr != NULL && info_ptr != NULL &&
(info_ptr->valid & PNG_INFO_iCCP) != 0 &&
name != NULL && compression_type != NULL && profile != NULL &&
proflen != NULL)
name != NULL && profile != NULL && proflen != NULL)
{
*name = info_ptr->iccp_name;
*profile = info_ptr->iccp_profile;
@ -778,11 +777,13 @@ png_get_iCCP(png_const_structrp png_ptr, png_inforp info_ptr,
/* This is somewhat irrelevant since the profile data returned has
* actually been uncompressed.
*/
*compression_type = PNG_COMPRESSION_TYPE_BASE;
if (compression_type != NULL)
*compression_type = PNG_COMPRESSION_TYPE_BASE;
return (PNG_INFO_iCCP);
}
return (0);
}
#endif
@ -1192,7 +1193,7 @@ png_get_user_chunk_ptr(png_const_structrp png_ptr)
}
#endif
png_size_t PNGAPI
size_t PNGAPI
png_get_compression_buffer_size(png_const_structrp png_ptr)
{
if (png_ptr == NULL)

@ -29,8 +29,8 @@
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
*
* Last changed in libpng 1.6.1 [March 28, 2013]
* Copyright (c) 1998-2002,2004,2006-2013 Glenn Randers-Pehrson
* Last changed in libpng 1.6.35 [July 15, 2018]
* Copyright (c) 1998-2002,2004,2006-2013,2018 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@ -83,10 +83,10 @@
struct png_info_def
{
/* The following are necessary for every PNG file */
png_uint_32 width; /* width of image in pixels (from IHDR) */
png_uint_32 height; /* height of image in pixels (from IHDR) */
png_uint_32 valid; /* valid chunk data (see PNG_INFO_ below) */
png_size_t rowbytes; /* bytes needed to hold an untransformed row */
png_uint_32 width; /* width of image in pixels (from IHDR) */
png_uint_32 height; /* height of image in pixels (from IHDR) */
png_uint_32 valid; /* valid chunk data (see PNG_INFO_ below) */
size_t rowbytes; /* bytes needed to hold an untransformed row */
png_colorp palette; /* array of color values (valid & PNG_INFO_PLTE) */
png_uint_16 num_palette; /* number of color entries in "palette" (PLTE) */
png_uint_16 num_trans; /* number of transparent palette color (tRNS) */
@ -275,7 +275,7 @@ defined(PNG_READ_BACKGROUND_SUPPORTED)
/* The sCAL chunk describes the actual physical dimensions of the
* subject matter of the graphic. The chunk contains a unit specification
* a byte value, and two ASCII strings representing floating-point
* values. The values are width and height corresponsing to one pixel
* values. The values are width and height corresponding to one pixel
* in the image. Data values are valid if (valid & PNG_INFO_sCAL) is
* non-zero.
*/

@ -38,9 +38,9 @@
* file and, per its terms, should not be removed:
*/
/* libpng version 1.6.34, September 29, 2017 */
/* libpng version 1.6.35, July 15, 2018 */
/* Copyright (c) 1998-2017 Glenn Randers-Pehrson */
/* Copyright (c) 1998-2018 Glenn Randers-Pehrson */
/* This code is released under the libpng license. */
/* For conditions of distribution and use, see the disclaimer */

@ -29,8 +29,8 @@
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
*
* Last changed in libpng 1.6.32 [August 24, 2017]
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* Last changed in libpng 1.6.35 [July 15, 2018]
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@ -62,7 +62,7 @@ if (png_ptr->buffer_size < N) \
void PNGAPI
png_process_data(png_structrp png_ptr, png_inforp info_ptr,
png_bytep buffer, png_size_t buffer_size)
png_bytep buffer, size_t buffer_size)
{
if (png_ptr == NULL || info_ptr == NULL)
return;
@ -75,7 +75,7 @@ png_process_data(png_structrp png_ptr, png_inforp info_ptr,
}
}
png_size_t PNGAPI
size_t PNGAPI
png_process_data_pause(png_structrp png_ptr, int save)
{
if (png_ptr != NULL)
@ -88,7 +88,7 @@ png_process_data_pause(png_structrp png_ptr, int save)
else
{
/* This includes any pending saved bytes: */
png_size_t remaining = png_ptr->buffer_size;
size_t remaining = png_ptr->buffer_size;
png_ptr->buffer_size = 0;
/* So subtract the saved buffer size, unless all the data
@ -161,8 +161,8 @@ png_process_some_data(png_structrp png_ptr, png_inforp info_ptr)
void /* PRIVATE */
png_push_read_sig(png_structrp png_ptr, png_inforp info_ptr)
{
png_size_t num_checked = png_ptr->sig_bytes, /* SAFE, does not exceed 8 */
num_to_check = 8 - num_checked;
size_t num_checked = png_ptr->sig_bytes; /* SAFE, does not exceed 8 */
size_t num_to_check = 8 - num_checked;
if (png_ptr->buffer_size < num_to_check)
{
@ -446,7 +446,7 @@ png_push_read_chunk(png_structrp png_ptr, png_inforp info_ptr)
}
void PNGCBAPI
png_push_fill_buffer(png_structp png_ptr, png_bytep buffer, png_size_t length)
png_push_fill_buffer(png_structp png_ptr, png_bytep buffer, size_t length)
{
png_bytep ptr;
@ -456,7 +456,7 @@ png_push_fill_buffer(png_structp png_ptr, png_bytep buffer, png_size_t length)
ptr = buffer;
if (png_ptr->save_buffer_size != 0)
{
png_size_t save_size;
size_t save_size;
if (length < png_ptr->save_buffer_size)
save_size = length;
@ -473,7 +473,7 @@ png_push_fill_buffer(png_structp png_ptr, png_bytep buffer, png_size_t length)
}
if (length != 0 && png_ptr->current_buffer_size != 0)
{
png_size_t save_size;
size_t save_size;
if (length < png_ptr->current_buffer_size)
save_size = length;
@ -495,7 +495,7 @@ png_push_save_buffer(png_structrp png_ptr)
{
if (png_ptr->save_buffer_ptr != png_ptr->save_buffer)
{
png_size_t i, istop;
size_t i, istop;
png_bytep sp;
png_bytep dp;
@ -510,7 +510,7 @@ png_push_save_buffer(png_structrp png_ptr)
if (png_ptr->save_buffer_size + png_ptr->current_buffer_size >
png_ptr->save_buffer_max)
{
png_size_t new_max;
size_t new_max;
png_bytep old_buffer;
if (png_ptr->save_buffer_size > PNG_SIZE_MAX -
@ -522,7 +522,7 @@ png_push_save_buffer(png_structrp png_ptr)
new_max = png_ptr->save_buffer_size + png_ptr->current_buffer_size + 256;
old_buffer = png_ptr->save_buffer;
png_ptr->save_buffer = (png_bytep)png_malloc_warn(png_ptr,
(png_size_t)new_max);
(size_t)new_max);
if (png_ptr->save_buffer == NULL)
{
@ -550,7 +550,7 @@ png_push_save_buffer(png_structrp png_ptr)
void /* PRIVATE */
png_push_restore_buffer(png_structrp png_ptr, png_bytep buffer,
png_size_t buffer_length)
size_t buffer_length)
{
png_ptr->current_buffer = buffer;
png_ptr->current_buffer_size = buffer_length;
@ -590,7 +590,7 @@ png_push_read_IDAT(png_structrp png_ptr)
if (png_ptr->idat_size != 0 && png_ptr->save_buffer_size != 0)
{
png_size_t save_size = png_ptr->save_buffer_size;
size_t save_size = png_ptr->save_buffer_size;
png_uint_32 idat_size = png_ptr->idat_size;
/* We want the smaller of 'idat_size' and 'current_buffer_size', but they
@ -600,7 +600,7 @@ png_push_read_IDAT(png_structrp png_ptr)
* will break on either 16-bit or 64-bit platforms.
*/
if (idat_size < save_size)
save_size = (png_size_t)idat_size;
save_size = (size_t)idat_size;
else
idat_size = (png_uint_32)save_size;
@ -617,7 +617,7 @@ png_push_read_IDAT(png_structrp png_ptr)
if (png_ptr->idat_size != 0 && png_ptr->current_buffer_size != 0)
{
png_size_t save_size = png_ptr->current_buffer_size;
size_t save_size = png_ptr->current_buffer_size;
png_uint_32 idat_size = png_ptr->idat_size;
/* We want the smaller of 'idat_size' and 'current_buffer_size', but they
@ -626,7 +626,7 @@ png_push_read_IDAT(png_structrp png_ptr)
* larger - this cannot overflow.
*/
if (idat_size < save_size)
save_size = (png_size_t)idat_size;
save_size = (size_t)idat_size;
else
idat_size = (png_uint_32)save_size;
@ -653,7 +653,7 @@ png_push_read_IDAT(png_structrp png_ptr)
void /* PRIVATE */
png_process_IDAT_data(png_structrp png_ptr, png_bytep buffer,
png_size_t buffer_length)
size_t buffer_length)
{
/* The caller checks for a non-zero buffer length. */
if (!(buffer_length > 0) || buffer == NULL)

@ -29,8 +29,8 @@
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
*
* Last changed in libpng 1.6.32 [August 24, 2017]
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* Last changed in libpng 1.6.35 [July 15, 2018]
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@ -238,7 +238,11 @@
defined(__SSE2__) || defined(_M_X64) || defined(_M_AMD64) || \
(defined(_M_IX86_FP) && _M_IX86_FP >= 2)
# define PNG_INTEL_SSE_OPT 1
# else
# define PNG_INTEL_SSE_OPT 0
# endif
# else
# define PNG_INTEL_SSE_OPT 0
# endif
#endif
@ -262,6 +266,8 @@
# if PNG_INTEL_SSE_IMPLEMENTATION > 0
# define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_sse2
# endif
#else
# define PNG_INTEL_SSE_IMPLEMENTATION 0
#endif
#if PNG_MIPS_MSA_OPT > 0
@ -291,6 +297,7 @@
#endif
#endif
/* Is this a build of a DLL where compilation of the object modules requires
* different preprocessor settings to those required for a simple library? If
* so PNG_BUILD_DLL must be set.
@ -757,8 +764,8 @@
/* Added to libpng-1.2.6 JB */
#define PNG_ROWBYTES(pixel_bits, width) \
((pixel_bits) >= 8 ? \
((png_size_t)(width) * (((png_size_t)(pixel_bits)) >> 3)) : \
(( ((png_size_t)(width) * ((png_size_t)(pixel_bits))) + 7) >> 3) )
((size_t)(width) * (((size_t)(pixel_bits)) >> 3)) : \
(( ((size_t)(width) * ((size_t)(pixel_bits))) + 7) >> 3) )
/* This returns the number of trailing bits in the last byte of a row, 0 if the
* last byte is completely full of pixels. It is, in principle, (pixel_bits x
@ -946,7 +953,7 @@
* PNG files the -I directives must match.
*
* The most likely explanation is that you passed a -I in CFLAGS. This will
* not work; all the preprocessor directories and in particular all the -I
* not work; all the preprocessor directives and in particular all the -I
* directives must be in CPPFLAGS.
*/
#endif
@ -1075,15 +1082,15 @@ PNG_INTERNAL_FUNCTION(void,png_zfree,(voidpf png_ptr, voidpf ptr),PNG_EMPTY);
*/
PNG_INTERNAL_FUNCTION(void PNGCBAPI,png_default_read_data,(png_structp png_ptr,
png_bytep data, png_size_t length),PNG_EMPTY);
png_bytep data, size_t length),PNG_EMPTY);
#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
PNG_INTERNAL_FUNCTION(void PNGCBAPI,png_push_fill_buffer,(png_structp png_ptr,
png_bytep buffer, png_size_t length),PNG_EMPTY);
png_bytep buffer, size_t length),PNG_EMPTY);
#endif
PNG_INTERNAL_FUNCTION(void PNGCBAPI,png_default_write_data,(png_structp png_ptr,
png_bytep data, png_size_t length),PNG_EMPTY);
png_bytep data, size_t length),PNG_EMPTY);
#ifdef PNG_WRITE_FLUSH_SUPPORTED
# ifdef PNG_STDIO_SUPPORTED
@ -1097,7 +1104,7 @@ PNG_INTERNAL_FUNCTION(void,png_reset_crc,(png_structrp png_ptr),PNG_EMPTY);
/* Write the "data" buffer to whatever output you are using */
PNG_INTERNAL_FUNCTION(void,png_write_data,(png_structrp png_ptr,
png_const_bytep data, png_size_t length),PNG_EMPTY);
png_const_bytep data, size_t length),PNG_EMPTY);
/* Read and check the PNG file signature */
PNG_INTERNAL_FUNCTION(void,png_read_sig,(png_structrp png_ptr,
@ -1109,7 +1116,7 @@ PNG_INTERNAL_FUNCTION(png_uint_32,png_read_chunk_header,(png_structrp png_ptr),
/* Read data from whatever input you are using into the "data" buffer */
PNG_INTERNAL_FUNCTION(void,png_read_data,(png_structrp png_ptr, png_bytep data,
png_size_t length),PNG_EMPTY);
size_t length),PNG_EMPTY);
/* Read bytes into buf, and update png_ptr->crc */
PNG_INTERNAL_FUNCTION(void,png_crc_read,(png_structrp png_ptr, png_bytep buf,
@ -1127,7 +1134,7 @@ PNG_INTERNAL_FUNCTION(int,png_crc_error,(png_structrp png_ptr),PNG_EMPTY);
* since this is the maximum buffer size we can specify.
*/
PNG_INTERNAL_FUNCTION(void,png_calculate_crc,(png_structrp png_ptr,
png_const_bytep ptr, png_size_t length),PNG_EMPTY);
png_const_bytep ptr, size_t length),PNG_EMPTY);
#ifdef PNG_WRITE_FLUSH_SUPPORTED
PNG_INTERNAL_FUNCTION(void,png_flush,(png_structrp png_ptr),PNG_EMPTY);
@ -1210,7 +1217,7 @@ PNG_INTERNAL_FUNCTION(void,png_write_hIST,(png_structrp png_ptr,
/* Chunks that have keywords */
#ifdef PNG_WRITE_tEXt_SUPPORTED
PNG_INTERNAL_FUNCTION(void,png_write_tEXt,(png_structrp png_ptr,
png_const_charp key, png_const_charp text, png_size_t text_len),PNG_EMPTY);
png_const_charp key, png_const_charp text, size_t text_len),PNG_EMPTY);
#endif
#ifdef PNG_WRITE_zTXt_SUPPORTED
@ -1603,10 +1610,10 @@ PNG_INTERNAL_FUNCTION(void,png_push_check_crc,(png_structrp png_ptr),PNG_EMPTY);
PNG_INTERNAL_FUNCTION(void,png_push_save_buffer,(png_structrp png_ptr),
PNG_EMPTY);
PNG_INTERNAL_FUNCTION(void,png_push_restore_buffer,(png_structrp png_ptr,
png_bytep buffer, png_size_t buffer_length),PNG_EMPTY);
png_bytep buffer, size_t buffer_length),PNG_EMPTY);
PNG_INTERNAL_FUNCTION(void,png_push_read_IDAT,(png_structrp png_ptr),PNG_EMPTY);
PNG_INTERNAL_FUNCTION(void,png_process_IDAT_data,(png_structrp png_ptr,
png_bytep buffer, png_size_t buffer_length),PNG_EMPTY);
png_bytep buffer, size_t buffer_length),PNG_EMPTY);
PNG_INTERNAL_FUNCTION(void,png_push_process_row,(png_structrp png_ptr),
PNG_EMPTY);
PNG_INTERNAL_FUNCTION(void,png_push_handle_unknown,(png_structrp png_ptr,
@ -1876,13 +1883,13 @@ PNG_INTERNAL_FUNCTION(void,png_chunk_report,(png_const_structrp png_ptr,
#ifdef PNG_FLOATING_POINT_SUPPORTED
PNG_INTERNAL_FUNCTION(void,png_ascii_from_fp,(png_const_structrp png_ptr,
png_charp ascii, png_size_t size, double fp, unsigned int precision),
png_charp ascii, size_t size, double fp, unsigned int precision),
PNG_EMPTY);
#endif /* FLOATING_POINT */
#ifdef PNG_FIXED_POINT_SUPPORTED
PNG_INTERNAL_FUNCTION(void,png_ascii_from_fixed,(png_const_structrp png_ptr,
png_charp ascii, png_size_t size, png_fixed_point fp),PNG_EMPTY);
png_charp ascii, size_t size, png_fixed_point fp),PNG_EMPTY);
#endif /* FIXED_POINT */
#endif /* sCAL */
@ -1975,7 +1982,7 @@ PNG_INTERNAL_FUNCTION(void,png_ascii_from_fixed,(png_const_structrp png_ptr,
* the problem character.) This has not been tested within libpng.
*/
PNG_INTERNAL_FUNCTION(int,png_check_fp_number,(png_const_charp string,
png_size_t size, int *statep, png_size_tp whereami),PNG_EMPTY);
size_t size, int *statep, png_size_tp whereami),PNG_EMPTY);
/* This is the same but it checks a complete string and returns true
* only if it just contains a floating point number. As of 1.5.4 this
@ -1984,7 +1991,7 @@ PNG_INTERNAL_FUNCTION(int,png_check_fp_number,(png_const_charp string,
* for negative or zero values using the sticky flag.
*/
PNG_INTERNAL_FUNCTION(int,png_check_fp_string,(png_const_charp string,
png_size_t size),PNG_EMPTY);
size_t size),PNG_EMPTY);
#endif /* pCAL || sCAL */
#if defined(PNG_GAMMA_SUPPORTED) ||\
@ -2059,7 +2066,7 @@ typedef struct png_control
png_voidp error_buf; /* Always a jmp_buf at present. */
png_const_bytep memory; /* Memory buffer. */
png_size_t size; /* Size of the memory buffer. */
size_t size; /* Size of the memory buffer. */
unsigned int for_write :1; /* Otherwise it is a read structure */
unsigned int owned_file :1; /* We own the file in io_ptr */

@ -29,8 +29,8 @@
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
*
* Last changed in libpng 1.6.33 [September 28, 2017]
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* Last changed in libpng 1.6.35 [July 15, 2018]
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@ -1560,7 +1560,7 @@ png_image_begin_read_from_file(png_imagep image, const char *file_name)
#endif /* STDIO */
static void PNGCBAPI
png_image_memory_read(png_structp png_ptr, png_bytep out, png_size_t need)
png_image_memory_read(png_structp png_ptr, png_bytep out, size_t need)
{
if (png_ptr != NULL)
{
@ -1571,7 +1571,7 @@ png_image_memory_read(png_structp png_ptr, png_bytep out, png_size_t need)
if (cp != NULL)
{
png_const_bytep memory = cp->memory;
png_size_t size = cp->size;
size_t size = cp->size;
if (memory != NULL && size >= need)
{
@ -1590,7 +1590,7 @@ png_image_memory_read(png_structp png_ptr, png_bytep out, png_size_t need)
}
int PNGAPI png_image_begin_read_from_memory(png_imagep image,
png_const_voidp memory, png_size_t size)
png_const_voidp memory, size_t size)
{
if (image != NULL && image->version == PNG_IMAGE_VERSION)
{
@ -4178,7 +4178,7 @@ png_image_finish_read(png_imagep image, png_const_colorp background,
*
* NOTE: this will be changed in 1.7 because PNG_IMAGE_BUFFER_SIZE
* will be changed to use png_alloc_size_t; bigger images can be
* accomodated on 64-bit systems.
* accommodated on 64-bit systems.
*/
if (image->height <=
0xffffffffU/PNG_IMAGE_PIXEL_COMPONENT_SIZE(image->format)/check)

@ -29,8 +29,8 @@
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
*
* Last changed in libpng 1.6.24 [August 4, 2016]
* Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
* Last changed in libpng 1.6.35 [July 15, 2018]
* Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@ -57,7 +57,7 @@
* to read more than 64K on a 16-bit machine.
*/
void /* PRIVATE */
png_read_data(png_structrp png_ptr, png_bytep data, png_size_t length)
png_read_data(png_structrp png_ptr, png_bytep data, size_t length)
{
png_debug1(4, "reading %d bytes", (int)length);
@ -75,14 +75,14 @@ png_read_data(png_structrp png_ptr, png_bytep data, png_size_t length)
* than changing the library.
*/
void PNGCBAPI
png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
png_default_read_data(png_structp png_ptr, png_bytep data, size_t length)
{
png_size_t check;
size_t check;
if (png_ptr == NULL)
return;
/* fread() returns 0 on error, so it is OK to store this in a png_size_t
/* fread() returns 0 on error, so it is OK to store this in a size_t
* instead of an int, which is what fread() actually returns.
*/
check = fread(data, 1, length, png_voidcast(png_FILE_p, png_ptr->io_ptr));

File diff suppressed because it is too large Load Diff

@ -29,8 +29,8 @@
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
*
* Last changed in libpng 1.6.33 [September 28, 2017]
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* Last changed in libpng 1.6.35 [July 15, 2018]
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@ -130,7 +130,7 @@ png_get_int_32)(png_const_bytep buf)
png_uint_16 (PNGAPI
png_get_uint_16)(png_const_bytep buf)
{
/* ANSI-C requires an int value to accomodate at least 16 bits so this
/* ANSI-C requires an int value to accommodate at least 16 bits so this
* works and allows the compiler not to worry about possible narrowing
* on 32-bit systems. (Pre-ANSI systems did not make integers smaller
* than 16 bits either.)
@ -148,7 +148,7 @@ png_get_uint_16)(png_const_bytep buf)
void /* PRIVATE */
png_read_sig(png_structrp png_ptr, png_inforp info_ptr)
{
png_size_t num_checked, num_to_check;
size_t num_checked, num_to_check;
/* Exit if the user application does not expect a signature. */
if (png_ptr->sig_bytes >= 8)
@ -1676,7 +1676,7 @@ png_handle_sPLT(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
int entry_size, i;
png_uint_32 skip = 0;
png_uint_32 dl;
png_size_t max_dl;
size_t max_dl;
png_debug(1, "in png_handle_sPLT");
@ -2025,6 +2025,15 @@ png_handle_bKGD(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
else if ((png_ptr->color_type & PNG_COLOR_MASK_COLOR) == 0) /* GRAY */
{
if (png_ptr->bit_depth <= 8)
{
if (buf[0] != 0 || buf[1] >= (unsigned int)(1 << png_ptr->bit_depth))
{
png_chunk_benign_error(png_ptr, "invalid gray level");
return;
}
}
background.index = 0;
background.red =
background.green =
@ -2034,6 +2043,15 @@ png_handle_bKGD(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
else
{
if (png_ptr->bit_depth <= 8)
{
if (buf[0] != 0 || buf[2] != 0 || buf[4] != 0)
{
png_chunk_benign_error(png_ptr, "invalid color");
return;
}
}
background.index = 0;
background.red = png_get_uint_16(buf);
background.green = png_get_uint_16(buf + 2);
@ -2387,7 +2405,7 @@ void /* PRIVATE */
png_handle_sCAL(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
{
png_bytep buffer;
png_size_t i;
size_t i;
int state;
png_debug(1, "in png_handle_sCAL");
@ -2457,7 +2475,7 @@ png_handle_sCAL(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
else
{
png_size_t heighti = i;
size_t heighti = i;
state = 0;
if (png_check_fp_number((png_const_charp)buffer, length,
@ -2895,7 +2913,7 @@ png_cache_unknown_chunk(png_structrp png_ptr, png_uint_32 length)
{
PNG_CSTRING_FROM_CHUNK(png_ptr->unknown_chunk.name, png_ptr->chunk_name);
/* The following is safe because of the PNG_SIZE_MAX init above */
png_ptr->unknown_chunk.size = (png_size_t)length/*SAFE*/;
png_ptr->unknown_chunk.size = (size_t)length/*SAFE*/;
/* 'mode' is a flag array, only the bottom four bits matter here */
png_ptr->unknown_chunk.location = (png_byte)png_ptr->mode/*SAFE*/;
@ -3177,10 +3195,13 @@ png_check_chunk_length(png_const_structrp png_ptr, const png_uint_32 length)
{
png_alloc_size_t idat_limit = PNG_UINT_31_MAX;
size_t row_factor =
(png_ptr->width * png_ptr->channels * (png_ptr->bit_depth > 8? 2: 1)
+ 1 + (png_ptr->interlaced? 6: 0));
(size_t)png_ptr->width
* (size_t)png_ptr->channels
* (png_ptr->bit_depth > 8? 2: 1)
+ 1
+ (png_ptr->interlaced? 6: 0);
if (png_ptr->height > PNG_UINT_32_MAX/row_factor)
idat_limit=PNG_UINT_31_MAX;
idat_limit = PNG_UINT_31_MAX;
else
idat_limit = png_ptr->height * row_factor;
row_factor = row_factor > 32566? 32566 : row_factor;
@ -3707,8 +3728,8 @@ png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,
{
case 1:
{
png_bytep sp = row + (png_size_t)((row_info->width - 1) >> 3);
png_bytep dp = row + (png_size_t)((final_width - 1) >> 3);
png_bytep sp = row + (size_t)((row_info->width - 1) >> 3);
png_bytep dp = row + (size_t)((final_width - 1) >> 3);
unsigned int sshift, dshift;
unsigned int s_start, s_end;
int s_inc;
@ -3834,8 +3855,8 @@ png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,
case 4:
{
png_bytep sp = row + (png_size_t)((row_info->width - 1) >> 1);
png_bytep dp = row + (png_size_t)((final_width - 1) >> 1);
png_bytep sp = row + (size_t)((row_info->width - 1) >> 1);
png_bytep dp = row + (size_t)((final_width - 1) >> 1);
unsigned int sshift, dshift;
unsigned int s_start, s_end;
int s_inc;
@ -3897,12 +3918,12 @@ png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,
default:
{
png_size_t pixel_bytes = (row_info->pixel_depth >> 3);
size_t pixel_bytes = (row_info->pixel_depth >> 3);
png_bytep sp = row + (png_size_t)(row_info->width - 1)
png_bytep sp = row + (size_t)(row_info->width - 1)
* pixel_bytes;
png_bytep dp = row + (png_size_t)(final_width - 1) * pixel_bytes;
png_bytep dp = row + (size_t)(final_width - 1) * pixel_bytes;
int jstop = (int)png_pass_inc[pass];
png_uint_32 i;
@ -3939,8 +3960,8 @@ static void
png_read_filter_row_sub(png_row_infop row_info, png_bytep row,
png_const_bytep prev_row)
{
png_size_t i;
png_size_t istop = row_info->rowbytes;
size_t i;
size_t istop = row_info->rowbytes;
unsigned int bpp = (row_info->pixel_depth + 7) >> 3;
png_bytep rp = row + bpp;
@ -3957,8 +3978,8 @@ static void
png_read_filter_row_up(png_row_infop row_info, png_bytep row,
png_const_bytep prev_row)
{
png_size_t i;
png_size_t istop = row_info->rowbytes;
size_t i;
size_t istop = row_info->rowbytes;
png_bytep rp = row;
png_const_bytep pp = prev_row;
@ -3973,11 +3994,11 @@ static void
png_read_filter_row_avg(png_row_infop row_info, png_bytep row,
png_const_bytep prev_row)
{
png_size_t i;
size_t i;
png_bytep rp = row;
png_const_bytep pp = prev_row;
unsigned int bpp = (row_info->pixel_depth + 7) >> 3;
png_size_t istop = row_info->rowbytes - bpp;
size_t istop = row_info->rowbytes - bpp;
for (i = 0; i < bpp; i++)
{
@ -4413,7 +4434,7 @@ png_read_start_row(png_structrp png_ptr)
static PNG_CONST png_byte png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2};
unsigned int max_pixel_depth;
png_size_t row_bytes;
size_t row_bytes;
png_debug(1, "in png_read_start_row");

@ -29,8 +29,8 @@
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
*
* Last changed in libpng 1.6.32 [August 24, 2017]
* Copyright (c) 1998-2017 Glenn Randers-Pehrson
* Last changed in libpng 1.6.35 [July 15, 2018]
* Copyright (c) 1998-2018 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@ -341,7 +341,7 @@ png_set_pCAL(png_const_structrp png_ptr, png_inforp info_ptr,
png_const_charp purpose, png_int_32 X0, png_int_32 X1, int type,
int nparams, png_const_charp units, png_charpp params)
{
png_size_t length;
size_t length;
int i;
png_debug1(1, "in %s storage function", "pCAL");
@ -418,7 +418,7 @@ png_set_pCAL(png_const_structrp png_ptr, png_inforp info_ptr,
memcpy(info_ptr->pcal_units, units, length);
info_ptr->pcal_params = png_voidcast(png_charpp, png_malloc_warn(png_ptr,
(png_size_t)(((unsigned int)nparams + 1) * (sizeof (png_charp)))));
(size_t)(((unsigned int)nparams + 1) * (sizeof (png_charp)))));
if (info_ptr->pcal_params == NULL)
{
@ -458,7 +458,7 @@ void PNGAPI
png_set_sCAL_s(png_const_structrp png_ptr, png_inforp info_ptr,
int unit, png_const_charp swidth, png_const_charp sheight)
{
png_size_t lengthw = 0, lengthh = 0;
size_t lengthw = 0, lengthh = 0;
png_debug1(1, "in %s storage function", "sCAL");
@ -719,7 +719,7 @@ png_set_iCCP(png_const_structrp png_ptr, png_inforp info_ptr,
{
png_charp new_iccp_name;
png_bytep new_iccp_profile;
png_size_t length;
size_t length;
png_debug1(1, "in %s storage function", "iCCP");
@ -1046,7 +1046,7 @@ png_set_tRNS(png_structrp png_ptr, png_inforp info_ptr,
/* Changed from num_trans to PNG_MAX_PALETTE_LENGTH in version 1.2.1 */
info_ptr->trans_alpha = png_voidcast(png_bytep,
png_malloc(png_ptr, PNG_MAX_PALETTE_LENGTH));
memcpy(info_ptr->trans_alpha, trans_alpha, (png_size_t)num_trans);
memcpy(info_ptr->trans_alpha, trans_alpha, (size_t)num_trans);
}
png_ptr->trans_alpha = info_ptr->trans_alpha;
}
@ -1126,7 +1126,7 @@ png_set_sPLT(png_const_structrp png_ptr,
do
{
png_size_t length;
size_t length;
/* Skip invalid input entries */
if (entries->name == NULL || entries->entries == NULL)
@ -1591,7 +1591,7 @@ png_set_rows(png_const_structrp png_ptr, png_inforp info_ptr,
#endif
void PNGAPI
png_set_compression_buffer_size(png_structrp png_ptr, png_size_t size)
png_set_compression_buffer_size(png_structrp png_ptr, size_t size)
{
if (png_ptr == NULL)
return;

@ -29,8 +29,8 @@
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
*
* Last changed in libpng 1.6.32 [August 24, 2017]
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* Last changed in libpng 1.6.35 [July 15, 2018]
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@ -75,7 +75,7 @@
/* zlib.h declares a magic type 'uInt' that limits the amount of data that zlib
* can handle at once. This type need be no larger than 16 bits (so maximum of
* 65535), this define allows us to discover how big it is, but limited by the
* maximuum for png_size_t. The value can be overriden in a library build
* maximum for size_t. The value can be overridden in a library build
* (pngusr.h, or set it in CPPFLAGS) and it works to set it to a considerably
* lower value (e.g. 255 works). A lower value may help memory usage (slightly)
* and may even improve performance on some systems (and degrade it on others.)
@ -242,7 +242,7 @@ struct png_struct_def
png_uint_32 height; /* height of image in pixels */
png_uint_32 num_rows; /* number of rows in current pass */
png_uint_32 usr_width; /* width of row at start of write */
png_size_t rowbytes; /* size of row in bytes */
size_t rowbytes; /* size of row in bytes */
png_uint_32 iwidth; /* width of current interlaced row in pixels */
png_uint_32 row_number; /* current row in interlace pass */
png_uint_32 chunk_name; /* PNG_CHUNK() id of current chunk */
@ -260,7 +260,7 @@ struct png_struct_def
png_bytep try_row; /* buffer to save trial row when filtering */
png_bytep tst_row; /* buffer to save best trial row when filtering */
#endif
png_size_t info_rowbytes; /* Added in 1.5.4: cache of updated row bytes */
size_t info_rowbytes; /* Added in 1.5.4: cache of updated row bytes */
png_uint_32 idat_size; /* current IDAT size for read */
png_uint_32 crc; /* current chunk CRC value */
@ -335,7 +335,7 @@ struct png_struct_def
#endif
#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED)
png_color_8 shift; /* shift for significant bit tranformation */
png_color_8 shift; /* shift for significant bit transformation */
#endif
#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \
@ -356,10 +356,10 @@ struct png_struct_def
png_bytep current_buffer; /* buffer for recently used data */
png_uint_32 push_length; /* size of current input chunk */
png_uint_32 skip_length; /* bytes to skip in input data */
png_size_t save_buffer_size; /* amount of data now in save_buffer */
png_size_t save_buffer_max; /* total size of save_buffer */
png_size_t buffer_size; /* total amount of available input data */
png_size_t current_buffer_size; /* amount of data now in current_buffer */
size_t save_buffer_size; /* amount of data now in save_buffer */
size_t save_buffer_max; /* total size of save_buffer */
size_t buffer_size; /* total amount of available input data */
size_t current_buffer_size; /* amount of data now in current_buffer */
int process_mode; /* what push library is currently doing */
int cur_palette; /* current push library palette index */
@ -479,7 +479,7 @@ struct png_struct_def
#endif
/* New member added in libpng-1.2.26 */
png_size_t old_big_row_buf_size;
size_t old_big_row_buf_size;
#ifdef PNG_READ_SUPPORTED
/* New member added in libpng-1.2.30 */

@ -29,8 +29,8 @@
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
*
* Last changed in libpng 1.6.33 [September 28, 2017]
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* Last changed in libpng 1.6.35 [July 15, 2018]
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@ -297,8 +297,8 @@ png_do_invert(png_row_infop row_info, png_bytep row)
if (row_info->color_type == PNG_COLOR_TYPE_GRAY)
{
png_bytep rp = row;
png_size_t i;
png_size_t istop = row_info->rowbytes;
size_t i;
size_t istop = row_info->rowbytes;
for (i = 0; i < istop; i++)
{
@ -311,8 +311,8 @@ png_do_invert(png_row_infop row_info, png_bytep row)
row_info->bit_depth == 8)
{
png_bytep rp = row;
png_size_t i;
png_size_t istop = row_info->rowbytes;
size_t i;
size_t istop = row_info->rowbytes;
for (i = 0; i < istop; i += 2)
{
@ -326,8 +326,8 @@ png_do_invert(png_row_infop row_info, png_bytep row)
row_info->bit_depth == 16)
{
png_bytep rp = row;
png_size_t i;
png_size_t istop = row_info->rowbytes;
size_t i;
size_t istop = row_info->rowbytes;
for (i = 0; i < istop; i += 4)
{
@ -637,7 +637,7 @@ png_do_strip_channel(png_row_infop row_info, png_bytep row, int at_start)
return; /* The filler channel has gone already */
/* Fix the rowbytes value. */
row_info->rowbytes = (png_size_t)(dp-row);
row_info->rowbytes = (size_t)(dp-row);
}
#endif

@ -30,9 +30,14 @@
package sun.java2d.xr;
import sun.awt.*;
import sun.awt.image.*;
import sun.java2d.*;
import java.awt.Transparency;
import sun.awt.X11GraphicsConfig;
import sun.awt.X11ComponentPeer;
import sun.awt.X11GraphicsDevice;
import sun.awt.X11GraphicsEnvironment;
import sun.awt.image.SurfaceManager;
import sun.java2d.SurfaceData;
import sun.java2d.loops.SurfaceType;
public class XRGraphicsConfig extends X11GraphicsConfig implements
SurfaceManager.ProxiedGraphicsConfig {
@ -58,4 +63,14 @@ public class XRGraphicsConfig extends X11GraphicsConfig implements
public Object getProxyKey() {
return this;
}
public synchronized SurfaceType getSurfaceType() {
if (surfaceType != null) {
return surfaceType;
}
surfaceType = XRSurfaceData.getSurfaceType(this, Transparency.OPAQUE);
return surfaceType;
}
}

@ -25,17 +25,36 @@
package sun.java2d.xr;
import java.awt.*;
import java.awt.geom.*;
import java.awt.image.*;
import sun.awt.*;
import java.awt.AlphaComposite;
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.Image;
import java.awt.Rectangle;
import java.awt.Transparency;
import java.awt.geom.AffineTransform;
import java.awt.image.ColorModel;
import java.awt.image.DirectColorModel;
import java.awt.image.Raster;
import sun.awt.SunHints;
import sun.awt.SunToolkit;
import sun.awt.X11ComponentPeer;
import sun.awt.image.PixelConverter;
import sun.java2d.InvalidPipeException;
import sun.java2d.SunGraphics2D;
import sun.java2d.SurfaceData;
import sun.java2d.SurfaceDataProxy;
import sun.java2d.loops.*;
import sun.java2d.pipe.*;
import sun.java2d.x11.*;
import sun.java2d.loops.CompositeType;
import sun.java2d.loops.MaskFill;
import sun.java2d.loops.RenderLoops;
import sun.java2d.loops.SurfaceType;
import sun.java2d.loops.XORComposite;
import sun.java2d.pipe.PixelToShapeConverter;
import sun.java2d.pipe.Region;
import sun.java2d.pipe.ShapeDrawPipe;
import sun.java2d.pipe.TextPipe;
import sun.java2d.pipe.ValidatePipe;
import sun.java2d.x11.XSurfaceData;
import sun.font.FontManagerNativeLibrary;
public abstract class XRSurfaceData extends XSurfaceData {
@ -63,7 +82,8 @@ public abstract class XRSurfaceData extends XSurfaceData {
public static final SurfaceType
ByteA8X11 = SurfaceType.ByteGray.deriveSubType(DESC_BYTE_A8_X11);
public static final SurfaceType
IntRgbX11 = SurfaceType.IntRgb.deriveSubType(DESC_INT_RGB_X11);
IntRgbX11 = SurfaceType.IntRgb.deriveSubType(DESC_INT_RGB_X11,
PixelConverter.ArgbPre.instance);
public static final SurfaceType
IntArgbPreX11 = SurfaceType.IntArgbPre.deriveSubType(DESC_INT_ARGB_X11);

@ -69,8 +69,6 @@ gc/g1/plab/TestPLABResize.java 8191048 generi
gc/TestNUMAPageSize.java 8194949 generic-all
serviceability/jvmti/GetModulesInfo/JvmtiGetAllModulesTest.java 8195156 generic-all
compiler/compilercontrol/directives/LogTest.java 8181753 generic-all
gc/g1/ihop/TestIHOPStatic.java 8199486 generic-all

@ -57,6 +57,8 @@ applications/ctw/modules/java_desktop.java 8189604 windows-all
applications/ctw/modules/java_desktop_2.java 8189604 windows-all
applications/ctw/modules/jdk_jconsole.java 8189604 windows-all
compiler/cpuflags/TestAESIntrinsicsOnSupportedConfig.java 8190680 generic-all
#############################################################################
# :hotspot_gc
@ -149,10 +151,10 @@ vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses023/TestDescrip
vmTestbase/nsk/jdi/EventQueue/remove_l/remove_l005/TestDescription.java 8068225 generic-all
vmTestbase/nsk/jdi/stress/ClassPrepareEvents/ClassPrepareEvents001/ClassPrepareEvents001.java 6426321 generic-all
vmTestbase/metaspace/gc/firstGC_10m/TestDescription.java 8160008 generic-all
vmTestbase/metaspace/gc/firstGC_50m/TestDescription.java 8160008 generic-all
vmTestbase/metaspace/gc/firstGC_99m/TestDescription.java 8160008 generic-all
vmTestbase/metaspace/gc/firstGC_default/TestDescription.java 8160008 generic-all
vmTestbase/metaspace/gc/firstGC_10m/TestDescription.java 8208250 generic-all
vmTestbase/metaspace/gc/firstGC_50m/TestDescription.java 8208250 generic-all
vmTestbase/metaspace/gc/firstGC_99m/TestDescription.java 8208250 generic-all
vmTestbase/metaspace/gc/firstGC_default/TestDescription.java 8208250 generic-all
vmTestbase/nsk/jvmti/ClearBreakpoint/clrbrk001/TestDescription.java 8016181 generic-all
vmTestbase/nsk/jvmti/FieldModification/fieldmod001/TestDescription.java 8016181 generic-all
@ -169,23 +171,23 @@ vmTestbase/nsk/jvmti/AttachOnDemand/attach034/TestDescription.java 8042145 gener
vmTestbase/nsk/jvmti/AttachOnDemand/attach045/TestDescription.java 8202971 generic-all
vmTestbase/nsk/jvmti/unit/heap/HeapWalkTests/TestDescription.java 8016181 generic-all
vmTestbase/gc/lock/jni/jnilock002/TestDescription.java 8191869,8192647 generic-all
vmTestbase/gc/lock/jni/jnilock002/TestDescription.java 8208243,8192647 generic-all
vmTestbase/jit/escape/LockCoarsening/LockCoarsening001/TestDescription.java 8148743 generic-all
vmTestbase/jit/escape/LockCoarsening/LockCoarsening002/TestDescription.java 8079666 generic-all
vmTestbase/jit/escape/LockCoarsening/LockCoarsening002/TestDescription.java 8208259 generic-all
vmTestbase/vm/mlvm/indy/func/jvmti/redefineClassInBootstrap/TestDescription.java 8013267 generic-all
vmTestbase/vm/mlvm/indy/stress/java/relinkMutableCallSite/Test.java 8079664 generic-all
vmTestbase/vm/mlvm/indy/stress/java/relinkVolatileCallSite/Test.java 8079664 generic-all
vmTestbase/vm/mlvm/meth/func/java/throwException/Test.java 8079714 generic-all
vmTestbase/vm/mlvm/meth/func/jdi/breakpointOtherStratum/Test.java 8079713,8079714 generic-all
vmTestbase/vm/mlvm/meth/stress/compiler/deoptimize/Test.java 8079642,8079714 generic-all
vmTestbase/vm/mlvm/meth/stress/compiler/i2c_c2i/Test.java 8079714 generic-all
vmTestbase/vm/mlvm/meth/stress/compiler/sequences/Test.java 8079714 generic-all
vmTestbase/vm/mlvm/meth/stress/gc/callSequencesDuringGC/Test.java 8079714 generic-all
vmTestbase/vm/mlvm/meth/stress/java/sequences/Test.java 8079714 generic-all
vmTestbase/vm/mlvm/meth/stress/jdi/breakpointInCompiledCode/Test.java 8079714 generic-all
vmTestbase/vm/mlvm/mixed/stress/java/findDeadlock/TestDescription.java 8055376 generic-all
vmTestbase/vm/mlvm/meth/func/java/throwException/Test.java 8208255 generic-all
vmTestbase/vm/mlvm/meth/func/jdi/breakpointOtherStratum/Test.java 8208257,8208255 generic-all
vmTestbase/vm/mlvm/meth/stress/compiler/deoptimize/Test.java 8079642,8208255 generic-all
vmTestbase/vm/mlvm/meth/stress/compiler/i2c_c2i/Test.java 8208255 generic-all
vmTestbase/vm/mlvm/meth/stress/compiler/sequences/Test.java 8208255 generic-all
vmTestbase/vm/mlvm/meth/stress/gc/callSequencesDuringGC/Test.java 8208255 generic-all
vmTestbase/vm/mlvm/meth/stress/java/sequences/Test.java 8208255 generic-all
vmTestbase/vm/mlvm/meth/stress/jdi/breakpointInCompiledCode/Test.java 8208255 generic-all
vmTestbase/vm/mlvm/mixed/stress/java/findDeadlock/TestDescription.java 8208278 generic-all
vmTestbase/vm/mlvm/mixed/stress/regression/b6969574/INDIFY_Test.java 8079650 generic-all
vmTestbase/vm/mlvm/indy/func/jvmti/mergeCP_indy2none_a/TestDescription.java 8013267 generic-all
vmTestbase/vm/mlvm/indy/func/jvmti/mergeCP_indy2manyDiff_b/TestDescription.java 8013267 generic-all

@ -0,0 +1,102 @@
/*
* Copyright (c) 2018, 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.
*/
// This class has an unknown attribute called UnknownAttr.Added. The
// attribute should be ignored by the JVM.
//
class UnknownAttr {
0xCAFEBABE;
0; // minor version
55; // version
[] { // Constant Pool
; // first element is empty
class #2; // #1
Utf8 "UnknownAttr"; // #2
class #4; // #3
Utf8 "java/lang/Object"; // #4
Utf8 "<init>"; // #5
Utf8 "()V"; // #6
Utf8 "Code"; // #7
Method #3 #9; // #8
NameAndType #5 #6; // #9
Utf8 "main"; // #10
Utf8 "([Ljava/lang/String;)V"; // #11
Utf8 "UnknownAttr.Added"; // #12
} // Constant Pool
0x0021; // access
#1;// this_cpx
#3;// super_cpx
[] { // Interfaces
} // Interfaces
[] { // fields
} // fields
[] { // methods
{ // Member
0x0001; // access
#5; // name_cpx
#6; // sig_cpx
[] { // Attributes
Attr(#7) { // Code
1; // max_stack
1; // max_locals
Bytes[]{
0x2AB70008B1;
}
[] { // Traps
} // end Traps
[] { // Attributes
} // Attributes
} // end Code
} // Attributes
} // Member
;
{ // Member
0x0009; // access
#10; // name_cpx
#11; // sig_cpx
[] { // Attributes
Attr(#7) { // Code
0; // max_stack
1; // max_locals
Bytes[]{
0xB1;
}
[] { // Traps
} // end Traps
[] { // Attributes
} // Attributes
} // end Code
} // Attributes
} // Member
} // methods
[] { // Attributes
Attr(#12) { // UnknownAttr.Added
0x00;
} // end UnknownAttr.Added
} // Attributes
} // end class UnknownAttr

@ -0,0 +1,44 @@
/*
* Copyright (c) 2018, 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 8207944
* @summary Unknown attribute erroneously causes ClassFormatError exception.
* @compile UnknownAttr.jcod
* @run main UnknownAttrTest
*/
// Test that an unknown class attribute is ignored and no exception is thrown.
public class UnknownAttrTest {
public static void main(String args[]) throws Throwable {
System.out.println("Regression test for bug 8207944");
try {
Class newClass = Class.forName("UnknownAttr");
} catch (java.lang.Throwable e) {
throw new RuntimeException(
"Unexpected exception: " + e.getMessage());
}
}
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2018, 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
@ -69,6 +69,10 @@ public class JvmtiGetAllModulesTest {
// to be equal to what Java reports
modules.removeIf(mod -> !mod.isNamed());
// jdk.proxy1 and jdk.proxy2 modules are dynamically initialized by Graal code in case Graal VM is used.
// We need to filter them out because they are not part of boot modules. See more details in JDK-8195156.
modules.removeIf(mod -> mod.getName().startsWith("jdk.proxy"));
return modules;
}

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase jit/escape/LockCoarsening/LockCoarsening001.
* VM Testbase keywords: [jit, quarantine]
* VM Testbase comments: JDK-8148743
* VM Testbase comments: 8148743
*
* @library /vmTestbase
* /test/lib

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase jit/escape/LockCoarsening/LockCoarsening002.
* VM Testbase keywords: [jit, quick, quarantine]
* VM Testbase comments: JDK-8079666
* VM Testbase comments: 8208259
*
* @library /vmTestbase
* /test/lib

@ -28,7 +28,7 @@
*
* @summary converted from VM Testbase metaspace/gc/firstGC_10m.
* VM Testbase keywords: [nonconcurrent, quarantine]
* VM Testbase comments: JDK-8160008
* VM Testbase comments: 8208250
*
* @library /vmTestbase /test/lib
* @run driver jdk.test.lib.FileInstaller . .

@ -28,7 +28,7 @@
*
* @summary converted from VM Testbase metaspace/gc/firstGC_50m.
* VM Testbase keywords: [nonconcurrent, quarantine]
* VM Testbase comments: JDK-8160008
* VM Testbase comments: 8208250
*
* @library /vmTestbase /test/lib
* @run driver jdk.test.lib.FileInstaller . .

@ -28,7 +28,7 @@
*
* @summary converted from VM Testbase metaspace/gc/firstGC_99m.
* VM Testbase keywords: [nonconcurrent, quarantine]
* VM Testbase comments: JDK-8160008
* VM Testbase comments: 8208250
*
* @library /vmTestbase /test/lib
* @run driver jdk.test.lib.FileInstaller . .

@ -28,7 +28,7 @@
*
* @summary converted from VM Testbase metaspace/gc/firstGC_default.
* VM Testbase keywords: [nonconcurrent, quarantine]
* VM Testbase comments: JDK-8160008
* VM Testbase comments: 8208250
*
* @library /vmTestbase /test/lib
* @run driver jdk.test.lib.FileInstaller . .

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase metaspace/shrink_grow/CompressedClassSpaceSize.
* VM Testbase keywords: [monitoring, quarantine]
* VM Testbase comments: JDK-8058967
* VM Testbase comments: 8058967
*
* @requires vm.opt.final.ClassUnloading
* @library /vmTestbase /test/lib

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase nsk/jdb/exclude/exclude001.
* VM Testbase keywords: [jpda, jdb, quarantine]
* VM Testbase comments: JDK-8191037
* VM Testbase comments: 8191037
* VM Testbase readme:
* DECSRIPTION
* A positive test for the 'exclude' command.

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase nsk/jdi/AttachingConnector/attach/attach002.
* VM Testbase keywords: [quick, jpda, jdi, quarantine]
* VM Testbase comments: JDK-8054463
* VM Testbase comments: 8054463
* VM Testbase readme:
* DESCRIPTION
* The test checks that debugger may establish connection with

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase nsk/jdi/AttachingConnector/attachnosuspend/attachnosuspend001.
* VM Testbase keywords: [quarantine]
* VM Testbase comments: JDK-8153613
* VM Testbase comments: 8153613
* VM Testbase readme:
* DESCRIPTION
* This test exactly as attach001 except using options:

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase nsk/jdi/BScenarios/hotswap/tc10x001.
* VM Testbase keywords: [quick, jpda, jdi, redefine, quarantine]
* VM Testbase comments: JDK-8013728
* VM Testbase comments: 8013728
* VM Testbase readme:
* DESCRIPTION:
* This test is from the group of so-called Borland's scenarios and

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase nsk/jdi/BScenarios/multithrd/tc02x004.
* VM Testbase keywords: [quick, jpda, jdi, quarantine]
* VM Testbase comments: JDK-4751860
* VM Testbase comments: 4751860
* VM Testbase readme:
* DESCRIPTION:
* This test is from the group of so-called Borland's scenarios and

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase nsk/jdi/ClassType/invokeMethod/invokemethod009.
* VM Testbase keywords: [jpda, jdi, quarantine]
* VM Testbase comments: JDK-4698670
* VM Testbase comments: 4698670
* VM Testbase readme:
* DESCRIPTION
* This test checks that the JDI method

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase nsk/jdi/ClassType/newInstance/newinstance002.
* VM Testbase keywords: [jpda, jdi, quarantine]
* VM Testbase comments: JDK-4462897
* VM Testbase comments: 4462897
* VM Testbase readme:
* DESCRIPTION:
* The test for the implementation of an object of the type

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase nsk/jdi/EventQueue/remove_l/remove_l005.
* VM Testbase keywords: [jpda, jdi, quarantine]
* VM Testbase comments: JDK-8068225
* VM Testbase comments: 8068225
* VM Testbase readme:
* DESCRIPTION:
* The test checks up the method

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase nsk/jdi/EventRequest/setEnabled/setenabled003.
* VM Testbase keywords: [jpda, jdi, quarantine]
* VM Testbase comments: JDK-8066993
* VM Testbase comments: 8066993
* VM Testbase readme:
* DESCRIPTION:
* The test for the implementation of an object of the type

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase nsk/jdi/EventRequestManager/createStepRequest/crstepreq001.
* VM Testbase keywords: [jpda, jdi, quarantine]
* VM Testbase comments: JDK-4447344
* VM Testbase comments: 4447344
* VM Testbase readme:
* DESCRIPTION
* This test checks that only one pending JDI step request is

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase nsk/jdi/EventRequestManager/deleteEventRequest/delevtreq002.
* VM Testbase keywords: [jpda, jdi, quarantine]
* VM Testbase comments: JDK-4613913
* VM Testbase comments: 4613913
* VM Testbase readme:
* DESCRIPTION:
* The test for the implementation of an object of the type

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase nsk/jdi/ObjectReference/invokeMethod/invokemethod006.
* VM Testbase keywords: [jpda, jdi, quarantine]
* VM Testbase comments: JDK-4698670
* VM Testbase comments: 4698670
* VM Testbase readme:
* DESCRIPTION
* This test checks that the JDI method

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase nsk/jdi/StackFrame/_bounds_/bounds001.
* VM Testbase keywords: [jpda, jdi, quarantine]
* VM Testbase comments: JDK-6604963
* VM Testbase comments: 6604963
* VM Testbase readme:
* DESCRIPTION:
* The test checks up the methods:

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase nsk/jdi/ThreadGroupReference/resume/resume001.
* VM Testbase keywords: [quick, jpda, jdi, quarantine]
* VM Testbase comments: JDK-8016181
* VM Testbase comments: 8016181
* VM Testbase readme:
* DESCRIPTION:
* The test for the implementation of an object of the type

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase nsk/jdi/ThreadReference/frameCount/framecount001.
* VM Testbase keywords: [quick, jpda, jdi, quarantine]
* VM Testbase comments: JDK-6530620
* VM Testbase comments: 6530620
* VM Testbase readme:
* DESCRIPTION:
* The test for the implementation of an object of the type

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase nsk/jdi/ThreadReference/isSuspended/issuspended002.
* VM Testbase keywords: [jpda, jdi, quarantine]
* VM Testbase comments: JDK-4903717
* VM Testbase comments: 4903717
* VM Testbase readme:
* DESCRIPTION:
* The test for the implementation of an object of the type

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase nsk/jdi/ThreadReference/resume/resume001.
* VM Testbase keywords: [quick, jpda, jdi, quarantine]
* VM Testbase comments: JDK-8072701
* VM Testbase comments: 8072701
* VM Testbase readme:
* DESCRIPTION:
* The test for the implementation of an object of the type

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase nsk/jdi/ThreadReference/stop/stop001.
* VM Testbase keywords: [quick, jpda, jdi, quarantine]
* VM Testbase comments: JDK-7034630
* VM Testbase comments: 7034630
* VM Testbase readme:
* DESCRIPTION:
* The test for the implementation of an object of the type

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase nsk/jdi/VirtualMachine/redefineClasses/redefineclasses021.
* VM Testbase keywords: [jpda, jdi, redefine, quarantine]
* VM Testbase comments: JDK-8065773
* VM Testbase comments: 8065773
* VM Testbase readme:
* DESCRIPTION:
* The test against the method com.sun.jdi.VirtualMachine.redefineClasses()

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase nsk/jdi/VirtualMachine/redefineClasses/redefineclasses023.
* VM Testbase keywords: [jpda, jdi, redefine, quarantine]
* VM Testbase comments: JDK-8065773
* VM Testbase comments: 8065773
* VM Testbase readme:
* DESCRIPTION:
* The test against the method com.sun.jdi.VirtualMachine.redefineClasses()

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase nsk/jdi/stress/ClassPrepareEvents/ClassPrepareEvents001.
* VM Testbase keywords: [stress, quick, jpda, jdi, feature_jdk6_jpda, vm6, quarantine]
* VM Testbase comments: JDK-6426321
* VM Testbase comments: 6426321
* VM Testbase readme:
* DESCRIPTION
* Test covers bug 6426321. Test stress event queue forcing loading of 3000 classes in debuggee.

@ -26,7 +26,7 @@
*
* @summary converted from VM Testbase nsk/jdwp/ThreadReference/ForceEarlyReturn/forceEarlyReturn001.
* VM Testbase keywords: [jpda, jdwp, feature_jdk6_jpda, vm6, monitoring, quarantine]
* VM Testbase comments: JDK-7199837
* VM Testbase comments: 7199837
* VM Testbase readme:
* DESCRIPTION
* This test performs checking for

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase nsk/monitoring/MemoryPoolMBean/getCollectionUsage/getusage004.
* VM Testbase keywords: [quick, monitoring, quarantine]
* VM Testbase comments: JDK-8016181
* VM Testbase comments: 8016181
* VM Testbase readme:
* DESCRIPTION
* The test checks that

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase nsk/monitoring/MemoryPoolMBean/isCollectionUsageThresholdExceeded/isexceeded003.
* VM Testbase keywords: [quick, monitoring, quarantine]
* VM Testbase comments: JDK-8153598
* VM Testbase comments: 8153598
* VM Testbase readme:
* DESCRIPTION
* The test checks that

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase nsk/monitoring/MemoryPoolMBean/isUsageThresholdExceeded/isexceeded001.
* VM Testbase keywords: [quick, monitoring, quarantine]
* VM Testbase comments: JDK-8153598
* VM Testbase comments: 8153598
* VM Testbase readme:
* DESCRIPTION
* The test checks that

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase nsk/monitoring/MemoryPoolMBean/isUsageThresholdExceeded/isexceeded002.
* VM Testbase keywords: [quick, monitoring, quarantine]
* VM Testbase comments: JDK-8153598
* VM Testbase comments: 8153598
* VM Testbase readme:
* DESCRIPTION
* The test checks that

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase nsk/monitoring/MemoryPoolMBean/isUsageThresholdExceeded/isexceeded003.
* VM Testbase keywords: [quick, monitoring, quarantine]
* VM Testbase comments: JDK-8153598
* VM Testbase comments: 8153598
* VM Testbase readme:
* DESCRIPTION
* The test checks that

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase nsk/monitoring/MemoryPoolMBean/isUsageThresholdExceeded/isexceeded004.
* VM Testbase keywords: [quick, monitoring, quarantine]
* VM Testbase comments: JDK-8153598
* VM Testbase comments: 8153598
* VM Testbase readme:
* DESCRIPTION
* The test checks that

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase nsk/monitoring/MemoryPoolMBean/isUsageThresholdExceeded/isexceeded005.
* VM Testbase keywords: [quick, monitoring, quarantine]
* VM Testbase comments: JDK-8153598
* VM Testbase comments: 8153598
* VM Testbase readme:
* DESCRIPTION
* The test checks that

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase nsk/monitoring/ThreadMXBean/ThreadInfo/Deadlock/JavaDeadlock001.
* VM Testbase keywords: [quick, monitoring, feature_136, vm6, quarantine]
* VM Testbase comments: JDK-8060733
* VM Testbase comments: 8060733
*
* @library /vmTestbase
* /test/lib

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi001.
* VM Testbase keywords: [monitoring, stress, stressopt, feature_136, nonconcurrent, vm6, quarantine]
* VM Testbase comments: JDK-7187073
* VM Testbase comments: 7187073
*
* @library /vmTestbase
* /test/lib

@ -28,7 +28,7 @@
*
* @summary converted from VM Testbase nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi002.
* VM Testbase keywords: [monitoring, stress, stressopt, feature_136, nonconcurrent, vm6, quarantine]
* VM Testbase comments: JDK-7187073
* VM Testbase comments: 7187073
*
* @library /vmTestbase
* /test/lib

@ -28,7 +28,7 @@
*
* @summary converted from VM Testbase nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi003.
* VM Testbase keywords: [monitoring, stress, stressopt, feature_136, nonconcurrent, vm6, quarantine]
* VM Testbase comments: JDK-7187073
* VM Testbase comments: 7187073
*
* @library /vmTestbase
* /test/lib

@ -28,7 +28,7 @@
*
* @summary converted from VM Testbase nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi004.
* VM Testbase keywords: [monitoring, stress, stressopt, feature_136, nonconcurrent, vm6, quarantine]
* VM Testbase comments: JDK-7187073
* VM Testbase comments: 7187073
*
* @library /vmTestbase
* /test/lib

@ -28,7 +28,7 @@
*
* @summary converted from VM Testbase nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi005.
* VM Testbase keywords: [monitoring, stress, stressopt, feature_136, nonconcurrent, vm6, quarantine]
* VM Testbase comments: JDK-7187073
* VM Testbase comments: 7187073
*
* @library /vmTestbase
* /test/lib

@ -28,7 +28,7 @@
*
* @summary converted from VM testbase nsk/stress/jni/gclocker/gcl001.
* VM testbase keywords: [stress, quick, feature_283, nonconcurrent, exclude]
* VM testbase comments: JDK-8199562
* VM testbase comments: 8208207
* VM testbase readme:
* DESCRIPTION
* Check compatibility of GC Locker improvements with JNI CS
@ -47,7 +47,7 @@
* @library /vmTestbase
* /test/lib
* @run driver jdk.test.lib.FileInstaller . .
* @ignore JDK-8199562
* @ignore 8208207
* @run main/othervm/native/timeout=480
* -XX:-UseGCOverheadLimit
* nsk.stress.jni.gclocker.gcl001

@ -26,7 +26,7 @@
*
* @summary converted from VM Testbase runtime/jbe/subcommon/subcommon02.
* VM Testbase keywords: [runtime]
* VM Testbase comments: JDK-7190319
* VM Testbase comments: 7190319
*
* @library /vmTestbase
* /test/lib

@ -28,7 +28,7 @@
*
* @summary converted from VM Testbase vm/gc/containers/TreeMap_Arrays.
* VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, monitoring, quarantine]
* VM Testbase comments: JDK-8014075
* VM Testbase comments: 8014075
*
* @library /vmTestbase
* /test/lib

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase vm/mlvm/meth/func/java/throwException.
* VM Testbase keywords: [feature_mlvm, quarantine]
* VM Testbase comments: 8079714
* VM Testbase comments: 8208255
* VM Testbase readme:
* DESCRIPTION
* The test creates a sequence of MHs (see vm/mlvm/mh/func/sequences test for details)

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase vm/mlvm/meth/func/jdi/breakpointOtherStratum.
* VM Testbase keywords: [feature_mlvm, nonconcurrent, fds, jdk, quarantine]
* VM Testbase comments: 8079713 8079714
* VM Testbase comments: 8208257 8208255
* VM Testbase readme:
* DESCRIPTION
* Performs debugging of invokedynamic call in vm.mlvm.share.jdi.INDIFY_Debuggee (with added

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase vm/mlvm/meth/stress/compiler/deoptimize.
* VM Testbase keywords: [feature_mlvm, nonconcurrent, quarantine]
* VM Testbase comments: 8079642 8079714
* VM Testbase comments: 8079642 8208255
* VM Testbase readme:
* DESCRIPTION
* The test creates and calls MH sequences (see vm/mlvm/mh/func/sequences test) causing compilation

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase vm/mlvm/meth/stress/compiler/i2c_c2i.
* VM Testbase keywords: [feature_mlvm, nonconcurrent, quarantine]
* VM Testbase comments: 8079714
* VM Testbase comments: 8208255
* VM Testbase readme:
* DESCRIPTION
* The test attempts to check MethodHandle i2c and c2i adapters by using sequences.

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase vm/mlvm/meth/stress/compiler/sequences.
* VM Testbase keywords: [feature_mlvm, nonconcurrent, quarantine]
* VM Testbase comments: 8079714
* VM Testbase comments: 8208255
* VM Testbase readme:
* DESCRIPTION
* Create various long sequences of method handles, adding/removing/joining/splitting arguments.

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase vm/mlvm/meth/stress/gc/callSequencesDuringGC.
* VM Testbase keywords: [feature_mlvm, nonconcurrent, quarantine]
* VM Testbase comments: 8079714
* VM Testbase comments: 8208255
* VM Testbase readme:
* DESCRIPTION
* The test verifies that MH logic is not affected by garbage collector and garbage collector

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase vm/mlvm/meth/stress/java/sequences.
* VM Testbase keywords: [feature_mlvm, nonconcurrent, quarantine]
* VM Testbase comments: 8079714
* VM Testbase comments: 8208255
* VM Testbase readme:
* DESCRIPTION
* Creates a sequence of method handles that manipulates arguments. The following manipulations are used:

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase vm/mlvm/meth/stress/jdi/breakpointInCompiledCode.
* VM Testbase keywords: [feature_mlvm, nonconcurrent, jdk, quarantine]
* VM Testbase comments: 8079714
* VM Testbase comments: 8208255
* VM Testbase readme:
* DESCRIPTION
* Execute a MethodHandle 10000 times to trigger Hotspot compilation. Set a debugger breakpoint on MH.

@ -27,7 +27,7 @@
*
* @summary converted from VM Testbase vm/mlvm/mixed/stress/java/findDeadlock.
* VM Testbase keywords: [feature_mlvm, nonconcurrent, quarantine, monitoring]
* VM Testbase comments: 8055376
* VM Testbase comments: 8208278
* VM Testbase readme:
* DESCRIPTION
* The test does the following in a loop:

@ -0,0 +1,83 @@
/*
* Copyright (c) 2018, 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
* @key headful
* @bug 8204931
* @summary test alpha colors are blended with background.
*/
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Frame;
import java.awt.Graphics;
import java.awt.Robot;
import javax.swing.SwingUtilities;
public class AlphaColorTest extends Component {
private Color color;
public AlphaColorTest(Color c) {
this.color = c;
}
public void paint(Graphics g) {
g.setColor(color);
g.fillRect(0, 0, getSize().width, getSize().height);
}
public Dimension getPreferredSize() {
return getSize();
}
public Dimension getSize() {
return new Dimension(200, 200);
}
public static void main(String args[]) throws Exception {
SwingUtilities.invokeAndWait(() -> createAndShowGUI());
Robot robot = new Robot();
robot.delay(5000);
robot.waitForIdle();
Color c = robot.getPixelColor(frame.getX() + 100, frame.getY() + 100);
int red = c.getRed();
frame.dispose();
// Should be 126-128, but be tolerant of gamma correction.
if (red < 122 || red > 132) {
throw new RuntimeException("Color is not as expected. Got " + c);
}
}
static Frame frame;
private static void createAndShowGUI() {
frame = new Frame("Alpha Color Test");
frame.setBackground(Color.black);
Color color = new Color(255, 255, 255, 127);
frame.add("Center", new AlphaColorTest(color));
frame.pack();
frame.setVisible(true);
}
}