# HG changeset patch # User Gilles Duboscq # Date 1413367768 -7200 # Node ID 3eed8712d410477ee933745e567333a93d7bc464 # Parent 562643f42b65dcec2b7065ef77988b9e8a3ac9a4# Parent 78df957d46ebd98ba5bb68f4d9654c8bea3f1587 Merge with jdk8u11-b12 diff -r 562643f42b65 -r 3eed8712d410 .hgtags --- a/.hgtags Wed Oct 15 12:04:20 2014 +0200 +++ b/.hgtags Wed Oct 15 12:09:28 2014 +0200 @@ -426,6 +426,7 @@ e5561d89fe8bfc79cd6c8fcc36d270cc6a49ec6e jdk8u5-b02 2f9eb9fcab6c42c8c84ddb44170ea33235116d84 jdk8u5-b03 5ac720d47ab83f8eb2f5fe3641667823a0298f41 jdk8u5-b04 +b90de55aca30678ab0fec05d6a61bb3468b783d2 jdk8u11-b00 b90de55aca30678ab0fec05d6a61bb3468b783d2 jdk8u5-b05 956c0e048ef29ee9a8026fb05858abe64b4e0ceb jdk8u5-b06 46fa2940e6861df18a107b6b83a2df85239e5ec7 jdk8u5-b07 @@ -434,6 +435,18 @@ 629267e4f0b5155608edcd71922983be98786bd7 jdk8u5-b10 17a75e692af397532e2b296b24f6b9b6c239c633 jdk8u5-b11 9b289963cb9a14636fbe8faaa2dd6d3678464a7b jdk8u5-b12 +8a67179106085689906732013a282efeeb9bd5f4 jdk8u5-b13 +f0d759a6a2309a1c149d530b29db24eda885f267 jdk8u11-b01 +3c079aebb516765784dd8097887daadda5a76ac1 jdk8u11-b02 +0037e964ce486c009984171f004259263628079f jdk8u11-b03 +4c40343ecdb33fe046833fe4b8970fd29859c4ad jdk8u11-b04 +a4d44dfb7d30eea54bc172e4429a655454ae0bbf jdk8u11-b05 +b73ee2b9027c4183e520b2c0884d785ef9e539cf jdk8u11-b06 +561045d225990b8423af11fd80d2d704954c89c2 jdk8u11-b07 +af747c288b0f379448bebf56e2982f50caac6972 jdk8u11-b08 +34de1e8eeabbcc6e690f92766fd619beb9f3f049 jdk8u11-b09 +7e4ae023277bef5b82361fd985262f4009eb2fe8 jdk8u11-b10 +e6b7384074325d5a4ede728d6928ecb7f1cc1326 jdk8u11-b11 b124e22eb772806c13d942cc110de38da0108147 graal-0.1 483d05bf77a7c2a762aca1e06c4191bc06647176 graal-0.2 9535eccd2a115f6c6f0b15efb508b11ff74cc0d3 graal-0.3 diff -r 562643f42b65 -r 3eed8712d410 THIRD_PARTY_README diff -r 562643f42b65 -r 3eed8712d410 make/hotspot_version --- a/make/hotspot_version Wed Oct 15 12:04:20 2014 +0200 +++ b/make/hotspot_version Wed Oct 15 12:09:28 2014 +0200 @@ -34,8 +34,8 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2014 HS_MAJOR_VER=25 -HS_MINOR_VER=5 -HS_BUILD_NUMBER=02 +HS_MINOR_VER=11 +HS_BUILD_NUMBER=03 JDK_MAJOR_VER=1 JDK_MINOR_VER=8 diff -r 562643f42b65 -r 3eed8712d410 src/os/bsd/vm/os_bsd.cpp --- a/src/os/bsd/vm/os_bsd.cpp Wed Oct 15 12:04:20 2014 +0200 +++ b/src/os/bsd/vm/os_bsd.cpp Wed Oct 15 12:09:28 2014 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2014, 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 @@ -1115,10 +1115,6 @@ ::abort(); } -// unused on bsd for now. -void os::set_error_file(const char *logfile) {} - - // This method is a copy of JDK's sysGetLastErrorString // from src/solaris/hpi/src/system_md.c @@ -1808,6 +1804,7 @@ // determine if this is a legacy image or modules image // modules image doesn't have "jre" subdirectory len = strlen(buf); + assert(len < buflen, "Ran out of buffer space"); jrelib_p = buf + len; // Add the appropriate library subdir @@ -1841,7 +1838,7 @@ } } - strcpy(saved_jvm_path, buf); + strncpy(saved_jvm_path, buf, MAXPATHLEN); } void os::print_jni_name_prefix_on(outputStream* st, int args_size) { diff -r 562643f42b65 -r 3eed8712d410 src/os/linux/vm/os_linux.cpp --- a/src/os/linux/vm/os_linux.cpp Wed Oct 15 12:04:20 2014 +0200 +++ b/src/os/linux/vm/os_linux.cpp Wed Oct 15 12:09:28 2014 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2014, 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 @@ -1572,9 +1572,6 @@ ::abort(); } -// unused on linux for now. -void os::set_error_file(const char *logfile) {} - // This method is a copy of JDK's sysGetLastErrorString // from src/solaris/hpi/src/system_md.c @@ -2399,6 +2396,7 @@ // determine if this is a legacy image or modules image // modules image doesn't have "jre" subdirectory len = strlen(buf); + assert(len < buflen, "Ran out of buffer room"); jrelib_p = buf + len; snprintf(jrelib_p, buflen-len, "/jre/lib/%s", cpu_arch); if (0 != access(buf, F_OK)) { @@ -2419,7 +2417,7 @@ } } - strcpy(saved_jvm_path, buf); + strncpy(saved_jvm_path, buf, MAXPATHLEN); } void os::print_jni_name_prefix_on(outputStream* st, int args_size) { diff -r 562643f42b65 -r 3eed8712d410 src/os/solaris/vm/os_solaris.cpp --- a/src/os/solaris/vm/os_solaris.cpp Wed Oct 15 12:04:20 2014 +0200 +++ b/src/os/solaris/vm/os_solaris.cpp Wed Oct 15 12:09:28 2014 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, 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 @@ -1788,9 +1788,6 @@ ::abort(); // dump core (for debugging) } -// unused -void os::set_error_file(const char *logfile) {} - // DLL functions const char* os::dll_file_extension() { return ".so"; } @@ -2474,6 +2471,7 @@ // determine if this is a legacy image or modules image // modules image doesn't have "jre" subdirectory len = strlen(buf); + assert(len < buflen, "Ran out of buffer space"); jrelib_p = buf + len; snprintf(jrelib_p, buflen-len, "/jre/lib/%s", cpu_arch); if (0 != access(buf, F_OK)) { @@ -2492,7 +2490,7 @@ } } - strcpy(saved_jvm_path, buf); + strncpy(saved_jvm_path, buf, MAXPATHLEN); } diff -r 562643f42b65 -r 3eed8712d410 src/os/windows/vm/os_windows.cpp --- a/src/os/windows/vm/os_windows.cpp Wed Oct 15 12:04:20 2014 +0200 +++ b/src/os/windows/vm/os_windows.cpp Wed Oct 15 12:09:28 2014 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, 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 @@ -1819,7 +1819,8 @@ // libjvm.so is installed there (append a fake suffix // hotspot/libjvm.so). char* java_home_var = ::getenv("JAVA_HOME"); - if (java_home_var != NULL && java_home_var[0] != 0) { + if (java_home_var != NULL && java_home_var[0] != 0 && + strlen(java_home_var) < (size_t)buflen) { strncpy(buf, java_home_var, buflen); @@ -1837,9 +1838,9 @@ } if(buf[0] == '\0') { - GetModuleFileName(vm_lib_handle, buf, buflen); - } - strcpy(saved_jvm_path, buf); + GetModuleFileName(vm_lib_handle, buf, buflen); + } + strncpy(saved_jvm_path, buf, MAX_PATH); } @@ -2303,19 +2304,8 @@ } */ -#endif //_WIN64 - - -// Fatal error reporting is single threaded so we can make this a -// static and preallocated. If it's more than MAX_PATH silently ignore -// it. -static char saved_error_file[MAX_PATH] = {0}; - -void os::set_error_file(const char *logfile) { - if (strlen(logfile) <= MAX_PATH) { - strncpy(saved_error_file, logfile, MAX_PATH); - } -} +#endif // _WIN64 + static inline void report_error(Thread* t, DWORD exception_code, address addr, void* siginfo, void* context) { diff -r 562643f42b65 -r 3eed8712d410 src/share/vm/classfile/classFileParser.cpp --- a/src/share/vm/classfile/classFileParser.cpp Wed Oct 15 12:04:20 2014 +0200 +++ b/src/share/vm/classfile/classFileParser.cpp Wed Oct 15 12:09:28 2014 +0200 @@ -931,7 +931,7 @@ "Wrong size %u for field's Signature attribute in class file %s", attribute_length, CHECK); } - generic_signature_index = cfs->get_u2(CHECK); + generic_signature_index = parse_generic_signature_attribute(CHECK); } else if (attribute_name == vmSymbols::tag_runtime_visible_annotations()) { runtime_visible_annotations_length = attribute_length; runtime_visible_annotations = cfs->get_u1_buffer(); @@ -2311,8 +2311,7 @@ "Invalid Signature attribute length %u in class file %s", method_attribute_length, CHECK_(nullHandle)); } - cfs->guarantee_more(2, CHECK_(nullHandle)); // generic_signature_index - generic_signature_index = cfs->get_u2_fast(); + generic_signature_index = parse_generic_signature_attribute(CHECK_(nullHandle)); } else if (method_attribute_name == vmSymbols::tag_runtime_visible_annotations()) { runtime_visible_annotations_length = method_attribute_length; runtime_visible_annotations = cfs->get_u1_buffer(); @@ -2622,6 +2621,17 @@ return method_ordering; } +// Parse generic_signature attribute for methods and fields +u2 ClassFileParser::parse_generic_signature_attribute(TRAPS) { + ClassFileStream* cfs = stream(); + cfs->guarantee_more(2, CHECK_0); // generic_signature_index + u2 generic_signature_index = cfs->get_u2_fast(); + check_property( + valid_symbol_at(generic_signature_index), + "Invalid Signature attribute at constant pool index %u in class file %s", + generic_signature_index, CHECK_0); + return generic_signature_index; +} void ClassFileParser::parse_classfile_sourcefile_attribute(TRAPS) { ClassFileStream* cfs = stream(); @@ -2776,18 +2786,19 @@ ClassFileStream* cfs = stream(); u1* current_start = cfs->current(); - cfs->guarantee_more(2, CHECK); // length + guarantee_property(attribute_byte_length > sizeof(u2), + "Invalid BootstrapMethods attribute length %u in class file %s", + attribute_byte_length, + CHECK); + + cfs->guarantee_more(attribute_byte_length, CHECK); + int attribute_array_length = cfs->get_u2_fast(); guarantee_property(_max_bootstrap_specifier_index < attribute_array_length, "Short length on BootstrapMethods in class file %s", CHECK); - guarantee_property(attribute_byte_length > sizeof(u2), - "Invalid BootstrapMethods attribute length %u in class file %s", - attribute_byte_length, - CHECK); - // The attribute contains a counted array of counted tuples of shorts, // represending bootstrap specifiers: // length*{bootstrap_method_index, argument_count*{argument_index}} diff -r 562643f42b65 -r 3eed8712d410 src/share/vm/classfile/classFileParser.hpp --- a/src/share/vm/classfile/classFileParser.hpp Wed Oct 15 12:04:20 2014 +0200 +++ b/src/share/vm/classfile/classFileParser.hpp Wed Oct 15 12:09:28 2014 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, 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 @@ -266,6 +266,7 @@ u1* parse_stackmap_table(u4 code_attribute_length, TRAPS); // Classfile attribute parsing + u2 parse_generic_signature_attribute(TRAPS); void parse_classfile_sourcefile_attribute(TRAPS); void parse_classfile_source_debug_extension_attribute(int length, TRAPS); u2 parse_classfile_inner_classes_attribute(u1* inner_classes_attribute_start, diff -r 562643f42b65 -r 3eed8712d410 src/share/vm/classfile/stackMapTable.cpp --- a/src/share/vm/classfile/stackMapTable.cpp Wed Oct 15 12:04:20 2014 +0200 +++ b/src/share/vm/classfile/stackMapTable.cpp Wed Oct 15 12:09:28 2014 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2014, 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 @@ -134,6 +134,7 @@ } // check if uninitialized objects exist on backward branches check_new_object(frame, target, CHECK_VERIFY(frame->verifier())); + frame->verifier()->update_furthest_jump(target); } void StackMapTable::check_new_object( diff -r 562643f42b65 -r 3eed8712d410 src/share/vm/classfile/verifier.cpp --- a/src/share/vm/classfile/verifier.cpp Wed Oct 15 12:04:20 2014 +0200 +++ b/src/share/vm/classfile/verifier.cpp Wed Oct 15 12:09:28 2014 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2014, 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 @@ -632,6 +632,9 @@ bool no_control_flow = false; // Set to true when there is no direct control // flow from current instruction to the next // instruction in sequence + + set_furthest_jump(0); + Bytecodes::Code opcode; while (!bcs.is_last_bytecode()) { // Check for recursive re-verification before each bytecode. @@ -2245,6 +2248,29 @@ "Bad method call"); return; } + + // Make sure that this call is not jumped over. + if (bci < furthest_jump()) { + verify_error(ErrorContext::bad_code(bci), + "Bad method call from inside of a branch"); + return; + } + + // Make sure that this call is not done from within a TRY block because + // that can result in returning an incomplete object. Simply checking + // (bci >= start_pc) also ensures that this call is not done after a TRY + // block. That is also illegal because this call must be the first Java + // statement in the constructor. + ExceptionTable exhandlers(_method()); + int exlength = exhandlers.length(); + for(int i = 0; i < exlength; i++) { + if (bci >= exhandlers.start_pc(i)) { + verify_error(ErrorContext::bad_code(bci), + "Bad method call from after the start of a try block"); + return; + } + } + current_frame->initialize_object(type, current_type()); *this_uninit = true; } else if (type.is_uninitialized()) { @@ -2281,16 +2307,19 @@ Method* m = InstanceKlass::cast(ref_klass)->uncached_lookup_method( vmSymbols::object_initializer_name(), cp->signature_ref_at(bcs->get_index_u2())); - instanceKlassHandle mh(THREAD, m->method_holder()); - if (m->is_protected() && !mh->is_same_class_package(_klass())) { - bool assignable = current_type().is_assignable_from( - objectref_type, this, CHECK_VERIFY(this)); - if (!assignable) { - verify_error(ErrorContext::bad_type(bci, - TypeOrigin::cp(new_class_index, objectref_type), - TypeOrigin::implicit(current_type())), - "Bad access to protected method"); - return; + // Do nothing if method is not found. Let resolution detect the error. + if (m != NULL) { + instanceKlassHandle mh(THREAD, m->method_holder()); + if (m->is_protected() && !mh->is_same_class_package(_klass())) { + bool assignable = current_type().is_assignable_from( + objectref_type, this, CHECK_VERIFY(this)); + if (!assignable) { + verify_error(ErrorContext::bad_type(bci, + TypeOrigin::cp(new_class_index, objectref_type), + TypeOrigin::implicit(current_type())), + "Bad access to protected method"); + return; + } } } } diff -r 562643f42b65 -r 3eed8712d410 src/share/vm/classfile/verifier.hpp --- a/src/share/vm/classfile/verifier.hpp Wed Oct 15 12:04:20 2014 +0200 +++ b/src/share/vm/classfile/verifier.hpp Wed Oct 15 12:09:28 2014 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2014, 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 @@ -258,6 +258,9 @@ ErrorContext _error_context; // contains information about an error + // Used to detect illegal jumps over calls to super() nd this() in ctors. + int32_t _furthest_jump; + void verify_method(methodHandle method, TRAPS); char* generate_code_data(methodHandle m, u4 code_length, TRAPS); void verify_exception_handler_table(u4 code_length, char* code_data, @@ -403,6 +406,20 @@ Symbol* create_temporary_symbol(const char *s, int length, TRAPS); TypeOrigin ref_ctx(const char* str, TRAPS); + + // Keep track of the furthest branch done in a method to make sure that + // there are no branches over calls to super() or this() from inside of + // a constructor. + int32_t furthest_jump() { return _furthest_jump; } + + void set_furthest_jump(int32_t target) { + _furthest_jump = target; + } + + void update_furthest_jump(int32_t target) { + if (target > _furthest_jump) _furthest_jump = target; + } + }; inline int ClassVerifier::change_sig_to_verificationType( diff -r 562643f42b65 -r 3eed8712d410 src/share/vm/compiler/compileBroker.cpp --- a/src/share/vm/compiler/compileBroker.cpp Wed Oct 15 12:04:20 2014 +0200 +++ b/src/share/vm/compiler/compileBroker.cpp Wed Oct 15 12:09:28 2014 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2014, 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 @@ -2170,6 +2170,7 @@ ResourceMark rm; char* method_name = method->name()->as_C_string(); strncpy(_last_method_compiled, method_name, CompileBroker::name_buffer_length); + _last_method_compiled[CompileBroker::name_buffer_length - 1] = '\0'; // ensure null terminated char current_method[CompilerCounters::cmname_buffer_length]; size_t maxLen = CompilerCounters::cmname_buffer_length; diff -r 562643f42b65 -r 3eed8712d410 src/share/vm/oops/klassVtable.cpp --- a/src/share/vm/oops/klassVtable.cpp Wed Oct 15 12:04:20 2014 +0200 +++ b/src/share/vm/oops/klassVtable.cpp Wed Oct 15 12:09:28 2014 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, 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 @@ -249,6 +249,17 @@ // For bytecodes not produced by javac together it is possible that a method does not override // the superclass's method, but might indirectly override a super-super class's vtable entry // If none found, return a null superk, else return the superk of the method this does override +// For public and protected methods: if they override a superclass, they will +// also be overridden themselves appropriately. +// Private methods do not override and are not overridden. +// Package Private methods are trickier: +// e.g. P1.A, pub m +// P2.B extends A, package private m +// P1.C extends B, public m +// P1.C.m needs to override P1.A.m and can not override P2.B.m +// Therefore: all package private methods need their own vtable entries for +// them to be the root of an inheritance overriding decision +// Package private methods may also override other vtable entries InstanceKlass* klassVtable::find_transitive_override(InstanceKlass* initialsuper, methodHandle target_method, int vtable_index, Handle target_loader, Symbol* target_classname, Thread * THREAD) { InstanceKlass* superk = initialsuper; @@ -396,8 +407,11 @@ target_classname, THREAD)) != (InstanceKlass*)NULL)))) { - // overriding, so no new entry - allocate_new = false; + // Package private methods always need a new entry to root their own + // overriding. They may also override other methods. + if (!target_method()->is_package_private()) { + allocate_new = false; + } if (checkconstraints) { // Override vtable entry if passes loader constraint check @@ -541,8 +555,9 @@ AccessFlags class_flags, TRAPS) { if (class_flags.is_interface()) { - // Interfaces do not use vtables, so there is no point to assigning - // a vtable index to any of their methods. If we refrain from doing this, + // Interfaces do not use vtables, except for java.lang.Object methods, + // so there is no point to assigning + // a vtable index to any of their local methods. If we refrain from doing this, // we can use Method::_vtable_index to hold the itable index return false; } @@ -580,6 +595,12 @@ return true; } + // Package private methods always need a new entry to root their own + // overriding. This allows transitive overriding to work. + if (target_method()->is_package_private()) { + return true; + } + // search through the super class hierarchy to see if we need // a new entry ResourceMark rm; diff -r 562643f42b65 -r 3eed8712d410 src/share/vm/runtime/os.hpp --- a/src/share/vm/runtime/os.hpp Wed Oct 15 12:04:20 2014 +0200 +++ b/src/share/vm/runtime/os.hpp Wed Oct 15 12:09:28 2014 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, 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 @@ -473,9 +473,6 @@ // run cmd in a separate process and return its exit code; or -1 on failures static int fork_and_exec(char *cmd); - // Set file to send error reports. - static void set_error_file(const char *logfile); - // os::exit() is merged with vm_exit() // static void exit(int num); diff -r 562643f42b65 -r 3eed8712d410 src/share/vm/utilities/events.cpp --- a/src/share/vm/utilities/events.cpp Wed Oct 15 12:04:20 2014 +0200 +++ b/src/share/vm/utilities/events.cpp Wed Oct 15 12:09:28 2014 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, 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 @@ -82,7 +82,7 @@ va_start(ap, format); // Save a copy of begin message and log it. _buffer.printv(format, ap); - Events::log(NULL, _buffer); + Events::log(NULL, "%s", (const char*)_buffer); va_end(ap); } } @@ -91,6 +91,6 @@ if (LogEvents) { // Append " done" to the begin message and log it _buffer.append(" done"); - Events::log(NULL, _buffer); + Events::log(NULL, "%s", (const char*)_buffer); } } diff -r 562643f42b65 -r 3eed8712d410 src/share/vm/utilities/vmError.cpp --- a/src/share/vm/utilities/vmError.cpp Wed Oct 15 12:04:20 2014 +0200 +++ b/src/share/vm/utilities/vmError.cpp Wed Oct 15 12:09:28 2014 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2014, 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 @@ -1002,7 +1002,6 @@ if (fd != -1) { out.print_raw("# An error report file with more information is saved as:\n# "); out.print_raw_cr(buffer); - os::set_error_file(buffer); log.set_fd(fd); } else {