/hg/release/icedtea6-1.6: Add new security patches and fix srcdi...
andrew at icedtea.classpath.org
andrew at icedtea.classpath.org
Tue Mar 30 15:14:00 PDT 2010
changeset d48a4f542e7d in /hg/release/icedtea6-1.6
details: http://icedtea.classpath.org/hg/release/icedtea6-1.6?cmd=changeset;node=d48a4f542e7d
author: Andrew John Hughes <ahughes at redhat.com>
date: Tue Mar 30 23:04:54 2010 +0100
Add new security patches and fix srcdir!=builddir issues.
2009-03-30 Andrew John Hughes <ahughes at redhat.com>
* patches/icedtea-systemtap.patch: Moved to HotSpot-
specific patch tree.
* Makefile.am: Add new security patches and add $(HSBUILD) to
systemtap patch. Put copied OpenJDK files in openjdk-copy
rather than a duplicate rt directory in the build tree.
* NEWS: List new security patches.
* patches/hotspot/default/systemtap.patch: From patches
/icedtea-systemtap.patch.
* patches/hotspot/original/icedtea-format.patch,
* patches/hotspot/original/systemtap.patch: Added for original
HotSpot build.
* patches/security/20100330/6626217.patch,
* patches/security/20100330/6633872.patch,
* patches/security/20100330/6639665.patch,
* patches/security/20100330/6736390.patch,
* patches/security/20100330/6745393.patch,
* patches/security/20100330/6887703.patch,
* patches/security/20100330/6888149.patch,
* patches/security/20100330/6892265.patch,
* patches/security/20100330/6893947.patch,
* patches/security/20100330/6893954.patch,
* patches/security/20100330/6898622.patch,
* patches/security/20100330/6898739.patch,
* patches/security/20100330/6899653.patch,
* patches/security/20100330/6902299.patch,
* patches/security/20100330/6904691.patch,
* patches/security/20100330/6909597.patch,
* patches/security/20100330/6910590.patch,
* patches/security/20100330/6914823.patch,
* patches/security/20100330/6914866.patch,
* patches/security/20100330/6932480.patch,
* patches/security/20100330/hotspot/default/6894807.patch,
* patches/security/20100330/hotspot/original/6894807.patch:
New security and hardening patches
http://www.oracle.com/technology/deploy/security/critical-patch-
updates/javacpumar2010.html
diffstat:
29 files changed, 4048 insertions(+), 187 deletions(-)
ChangeLog | 40
Makefile.am | 29
NEWS | 24
patches/hotspot/default/systemtap.patch | 182 ++
patches/hotspot/original/icedtea-format.patch | 48
patches/hotspot/original/systemtap.patch | 154 +
patches/icedtea-systemtap.patch | 182 --
patches/security/20100330/6626217.patch | 180 ++
patches/security/20100330/6633872.patch | 443 +++++
patches/security/20100330/6639665.patch | 51
patches/security/20100330/6736390.patch | 18
patches/security/20100330/6745393.patch | 1233 ++++++++++++++
patches/security/20100330/6887703.patch | 28
patches/security/20100330/6888149.patch | 33
patches/security/20100330/6892265.patch | 35
patches/security/20100330/6893947.patch | 86
patches/security/20100330/6893954.patch | 248 ++
patches/security/20100330/6898622.patch | 20
patches/security/20100330/6898739.patch | 437 ++++
patches/security/20100330/6899653.patch | 27
patches/security/20100330/6902299.patch | 104 +
patches/security/20100330/6904691.patch | 166 +
patches/security/20100330/6909597.patch | 74
patches/security/20100330/6910590.patch | 10
patches/security/20100330/6914823.patch | 80
patches/security/20100330/6914866.patch | 118 +
patches/security/20100330/6932480.patch | 43
patches/security/20100330/hotspot/default/6894807.patch | 27
patches/security/20100330/hotspot/original/6894807.patch | 115 +
diffs (truncated from 4391 to 500 lines):
diff -r 924928f21072 -r d48a4f542e7d ChangeLog
--- a/ChangeLog Thu Mar 18 18:41:04 2010 +0000
+++ b/ChangeLog Tue Mar 30 23:04:54 2010 +0100
@@ -1,3 +1,43 @@ 2010-03-18 Pavel Tisnovsky <ptisnovs at re
+2009-03-30 Andrew John Hughes <ahughes at redhat.com>
+
+ * patches/icedtea-systemtap.patch:
+ Moved to HotSpot-specific patch tree.
+ * Makefile.am: Add new security patches
+ and add $(HSBUILD) to systemtap patch.
+ Put copied OpenJDK files in openjdk-copy
+ rather than a duplicate rt directory
+ in the build tree.
+ * NEWS: List new security patches.
+ * patches/hotspot/default/systemtap.patch:
+ From patches/icedtea-systemtap.patch.
+ * patches/hotspot/original/icedtea-format.patch,
+ * patches/hotspot/original/systemtap.patch:
+ Added for original HotSpot build.
+ * patches/security/20100330/6626217.patch,
+ * patches/security/20100330/6633872.patch,
+ * patches/security/20100330/6639665.patch,
+ * patches/security/20100330/6736390.patch,
+ * patches/security/20100330/6745393.patch,
+ * patches/security/20100330/6887703.patch,
+ * patches/security/20100330/6888149.patch,
+ * patches/security/20100330/6892265.patch,
+ * patches/security/20100330/6893947.patch,
+ * patches/security/20100330/6893954.patch,
+ * patches/security/20100330/6898622.patch,
+ * patches/security/20100330/6898739.patch,
+ * patches/security/20100330/6899653.patch,
+ * patches/security/20100330/6902299.patch,
+ * patches/security/20100330/6904691.patch,
+ * patches/security/20100330/6909597.patch,
+ * patches/security/20100330/6910590.patch,
+ * patches/security/20100330/6914823.patch,
+ * patches/security/20100330/6914866.patch,
+ * patches/security/20100330/6932480.patch,
+ * patches/security/20100330/hotspot/default/6894807.patch,
+ * patches/security/20100330/hotspot/original/6894807.patch:
+ New security and hardening patches
+ http://www.oracle.com/technology/deploy/security/critical-patch-updates/javacpumar2010.html
+
2010-03-18 Pavel Tisnovsky <ptisnovs at redhat.com>
* patches/icedtea-jtreg-httpTest.patch: new regression test
diff -r 924928f21072 -r d48a4f542e7d Makefile.am
--- a/Makefile.am Thu Mar 18 18:41:04 2010 +0000
+++ b/Makefile.am Tue Mar 30 23:04:54 2010 +0100
@@ -720,7 +720,7 @@ endif
endif
if ENABLE_SYSTEMTAP
-ICEDTEA_PATCHES += patches/icedtea-systemtap.patch
+ICEDTEA_PATCHES += patches/hotspot/$(HSBUILD)/systemtap.patch
endif
ICEDTEA_PATCHES += \
@@ -750,6 +750,27 @@ ICEDTEA_PATCHES += \
patches/openjdk/oj100103-debugger-socket-overflow.patch \
patches/hotspot/$(HSBUILD)/icedtea-gcc-stack-markings.patch \
patches/icedtea-jtreg-httpTest.patch \
+ patches/security/20100330/6626217.patch \
+ patches/security/20100330/6633872.patch \
+ patches/security/20100330/6639665.patch \
+ patches/security/20100330/6736390.patch \
+ patches/security/20100330/6745393.patch \
+ patches/security/20100330/6887703.patch \
+ patches/security/20100330/6888149.patch \
+ patches/security/20100330/6892265.patch \
+ patches/security/20100330/6893947.patch \
+ patches/security/20100330/6893954.patch \
+ patches/security/20100330/hotspot/$(HSBUILD)/6894807.patch \
+ patches/security/20100330/6898622.patch \
+ patches/security/20100330/6898739.patch \
+ patches/security/20100330/6899653.patch \
+ patches/security/20100330/6902299.patch \
+ patches/security/20100330/6904691.patch \
+ patches/security/20100330/6909597.patch \
+ patches/security/20100330/6910590.patch \
+ patches/security/20100330/6914823.patch \
+ patches/security/20100330/6914866.patch \
+ patches/security/20100330/6932480.patch \
$(DISTRIBUTION_PATCHES)
stamps/extract.stamp: stamps/download.stamp
@@ -1477,9 +1498,9 @@ stamps/copy-source-files.stamp: stamps/o
stamps/copy-source-files.stamp: stamps/overlay.stamp
for copy_dir in $(ICEDTEA_COPY_DIRS) ; \
do \
- mkdir -p rt/$$copy_dir ; \
+ mkdir -p openjdk-copy/$$copy_dir ; \
cp -pPRf openjdk/jdk/src/share/classes/$$copy_dir/*.java \
- rt/$$copy_dir ; \
+ openjdk-copy/$$copy_dir ; \
done
mkdir -p stamps
touch stamps/copy-source-files.stamp
@@ -1592,7 +1613,7 @@ bootstrap/jdk1.7.0/jre/lib/tools.jar: st
# rt-closed.jar class files.
rt-source-files.txt: stamps/replace-hotspot.stamp stamps/copy-source-files.stamp
- find $(abs_top_srcdir)/rt $(LIVECONNECT_SRCS) -name '*.java' \
+ find $(abs_top_srcdir)/rt $(LIVECONNECT_SRCS) openjdk-copy -name '*.java' \
| sort -u > $@
stamps/rt-class-files.stamp: rt-source-files.txt
diff -r 924928f21072 -r d48a4f542e7d NEWS
--- a/NEWS Thu Mar 18 18:41:04 2010 +0000
+++ b/NEWS Tue Mar 30 23:04:54 2010 +0100
@@ -1,10 +1,32 @@ New in release 1.6.3 (2010-03-XX)
-New in release 1.6.3 (2010-03-XX)
+New in release 1.6.3 (2010-03-30)
- Enable debuginfo for saproc and jsig
- Add missing mkbc.c
- Backport of 6822370:
ReentrantReadWriteLock: threads hung when there are no threads holding onto the lock
- Increase ThreadStackSize by 512kb on 32-bit Zero platforms
- Make the original HotSpot build work for normal builds and disable Zero/Shark builds with it
+- Latest security updates and hardening patches:
+ - (CVE-2010-0837): JAR "unpack200" must verify input parameters (6902299)
+ - (CVE-2010-0845): No ClassCastException for HashAttributeSet constructors if run with -Xcomp (6894807)
+ - (CVE-2010-0838): CMM readMabCurveData Buffer Overflow Vulnerability (6899653)
+ - (CVE-2010-0082): Loader-constraint table allows arrays instead of only the base-classes (6626217)
+ - (CVE-2010-0095): Subclasses of InetAddress may incorrectly interpret network addresses (6893954)
+ - (CVE-2010-0085): File TOCTOU deserialization vulnerability (6736390)
+ - (CVE-2010-0091): Unsigned applet can retrieve the dragged information before drop action occurs (6887703)
+ - (CVE-2010-0088): Inflater/Deflater clone issues (6745393)
+ - (CVE-2010-0084): Policy/PolicyFile leak dynamic ProtectionDomains. (6633872)
+ - (CVE-2010-0092): AtomicReferenceArray causes SIGSEGV -> SEGV_MAPERR error (6888149)
+ - (CVE-2010-0094): Deserialization of RMIConnectionImpl objects should enforce stricter checks (6893947)
+ - (CVE-2010-0093): System.arraycopy unable to reference elements beyond Integer.MAX_VALUE bytes (6892265)
+ - (CVE-2010-0840): Applet Trusted Methods Chaining Privilege Escalation Vulnerability (6904691)
+ - (CVE-2010-0848): AWT Library Invalid Index Vulnerability (6914823)
+ - (CVE-2010-0847): ImagingLib arbitrary code execution vulnerability (6914866)
+ - (CVE-2009-3555): TLS: MITM attacks via session renegotiation
+ - 6639665: ThreadGroup finalizer allows creation of false root ThreadGroups
+ - 6898622: ObjectIdentifer.equals is not capable of detecting incorrectly encoded CommonName OIDs
+ - 6910590: Application can modify command array in ProcessBuilder
+ - 6909597: JPEGImageReader stepX Integer Overflow Vulnerability
+ - 6932480: Crash in CompilerThread/Parser. Unloaded array klass?
New in release 1.6.2 (2009-11-09)
- Latest security updates:
diff -r 924928f21072 -r d48a4f542e7d patches/hotspot/default/systemtap.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/default/systemtap.patch Tue Mar 30 23:04:54 2010 +0100
@@ -0,0 +1,182 @@
+diff -r 945bf7540697 make/linux/makefiles/dtrace.make
+--- openjdk/hotspot/make/linux/makefiles/dtrace.make Thu Jan 22 14:42:01 2009 -0800
++++ openjdk/hotspot/make/linux/makefiles/dtrace.make Mon Feb 02 13:47:34 2009 +0100
+@@ -25,3 +25,7 @@
+ # Linux does not build jvm_db
+ LIBJVM_DB =
+
++# But it does have a Systemtap dtrace compatible sys/sdt.h
++CFLAGS += -DDTRACE_ENABLED
++
++# It doesn't support HAVE_DTRACE_H though.
+--- openjdk/hotspot/src/share/vm/prims/jni.cpp 2009-10-13 15:34:52.499809508 +0200
++++ openjdk/hotspot/src/share/vm/prims/jni.cpp 2009-10-13 15:31:26.117823588 +0200
+@@ -1747,10 +1744,7 @@
+ JNI_QUICK_ENTRY(void, jni_Set##Result##Field(JNIEnv *env, jobject obj, jfieldID fieldID, Argument value)) \
+ JNIWrapper("Set" XSTR(Result) "Field"); \
+ \
+- HS_DTRACE_PROBE_CDECL_N(hotspot_jni, Set##Result##Field__entry, \
+- ( JNIEnv*, jobject, jfieldID FP_SELECT_##Result(COMMA Argument,/*empty*/) ) ); \
+- HS_DTRACE_PROBE_N(hotspot_jni, Set##Result##Field__entry, \
+- ( env, obj, fieldID FP_SELECT_##Result(COMMA value,/*empty*/) ) ); \
++ FP_SELECT_##Result(DTRACE_PROBE4(hotspot_jni, Set##Result##Field__entry, env, obj, fieldID, value),DTRACE_PROBE3(hotspot_jni, Set##Result##Field__entry, env, obj, fieldID)); \
+ \
+ oop o = JNIHandles::resolve_non_null(obj); \
+ klassOop k = o->klass(); \
+@@ -1924,10 +1918,7 @@
+ \
+ JNI_ENTRY(void, jni_SetStatic##Result##Field(JNIEnv *env, jclass clazz, jfieldID fieldID, Argument value)) \
+ JNIWrapper("SetStatic" XSTR(Result) "Field"); \
+- HS_DTRACE_PROBE_CDECL_N(hotspot_jni, SetStatic##Result##Field__entry,\
+- ( JNIEnv*, jclass, jfieldID FP_SELECT_##Result(COMMA Argument,/*empty*/) ) ); \
+- HS_DTRACE_PROBE_N(hotspot_jni, SetStatic##Result##Field__entry, \
+- ( env, clazz, fieldID FP_SELECT_##Result(COMMA value,/*empty*/) ) ); \
++ FP_SELECT_##Result(DTRACE_PROBE4(hotspot_jni, SetStatic##Result##Field__entry, env, clazz, fieldID, value),DTRACE_PROBE3(hotspot_jni, SetStatic##Result##Field__entry, env, clazz, fieldID)); \
+ \
+ JNIid* id = jfieldIDWorkaround::from_static_jfieldID(fieldID); \
+ assert(id->is_static_field_id(), "invalid static field id"); \
+@@ -2116,7 +2101,7 @@
+ DT_RETURN_MARK(GetObjectArrayElement, jobject, (const jobject&)ret);
+ objArrayOop a = objArrayOop(JNIHandles::resolve_non_null(array));
+ if (a->is_within_bounds(index)) {
+- jobject ret = JNIHandles::make_local(env, a->obj_at(index));
++ ret = JNIHandles::make_local(env, a->obj_at(index));
+ return ret;
+ } else {
+ char buf[jintAsStringSize];
+@@ -2150,14 +2150,14 @@
+
+ #define DEFINE_NEWSCALARARRAY(Return,Allocator,Result) \
+ \
+- DT_RETURN_MARK_DECL_FOR(Result, New##Result##Array, Return);\
++ DT_RETURN_MARK_DECL(New##Result##Array, Return);\
+ \
+ JNI_ENTRY(Return, \
+ jni_New##Result##Array(JNIEnv *env, jsize len)) \
+ JNIWrapper("New" XSTR(Result) "Array"); \
+ DTRACE_PROBE2(hotspot_jni, New##Result##Array__entry, env, len);\
+ Return ret = NULL;\
+- DT_RETURN_MARK_FOR(Result, New##Result##Array, Return, (const Return&)ret);\
++ DT_RETURN_MARK(New##Result##Array, Return, (const Return&)ret);\
+ \
+ oop obj= oopFactory::Allocator(len, CHECK_0); \
+ ret = (Return) JNIHandles::make_local(env, obj); \
+
+diff -r 945bf7540697 src/share/vm/utilities/dtrace.hpp
+--- openjdk/hotspot/src/share/vm/utilities/dtrace.hpp Thu Jan 22 14:42:01 2009 -0800
++++ openjdk/hotspot/src/share/vm/utilities/dtrace.hpp Mon Feb 02 13:47:34 2009 +0100
+@@ -1,5 +1,6 @@
+ /*
+ * Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved.
++ * Copyright 2009 Red Hat, Inc.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+@@ -22,14 +23,14 @@
+ *
+ */
+
+-#if defined(SOLARIS) && defined(DTRACE_ENABLED)
++#if defined(DTRACE_ENABLED)
+
+ #include <sys/sdt.h>
+
+ #define DTRACE_ONLY(x) x
+ #define NOT_DTRACE(x)
+
+-#else // ndef SOLARIS || ndef DTRACE_ENABLED
++#else // ndef DTRACE_ENABLED
+
+ #define DTRACE_ONLY(x)
+ #define NOT_DTRACE(x) x
+@@ -40,9 +41,16 @@
+ #define DTRACE_PROBE3(a,b,c,d,e) {;}
+ #define DTRACE_PROBE4(a,b,c,d,e,f) {;}
+ #define DTRACE_PROBE5(a,b,c,d,e,f,g) {;}
++#define DTRACE_PROBE6(a,b,c,d,e,f,g,h) {;}
++#define DTRACE_PROBE7(a,b,c,d,e,f,g,h,i) {;}
++#define DTRACE_PROBE8(a,b,c,d,e,f,g,h,i,j) {;}
++#define DTRACE_PROBE9(a,b,c,d,e,f,g,h,i,j,k) {;}
++#define DTRACE_PROBE10(a,b,c,d,e,f,g,h,i,j,k,l) {;}
+
+ #endif
+
++#if defined(SOLARIS)
++// Solaris dtrace needs actual extern function decls.
+ #define HS_DTRACE_PROBE_FN(provider,name)\
+ __dtrace_##provider##___##name
+
+@@ -50,6 +58,11 @@
+ DTRACE_ONLY(extern "C" void HS_DTRACE_PROBE_FN(provider,name) args)
+ #define HS_DTRACE_PROBE_CDECL_N(provider,name,args) \
+ DTRACE_ONLY(extern void HS_DTRACE_PROBE_FN(provider,name) args)
++#else
++// Systemtap dtrace compatible probes on GNU/Linux don't.
++#define HS_DTRACE_PROBE_DECL_N(provider,name,args)
++#define HS_DTRACE_PROBE_CDECL_N(provider,name,args)
++#endif
+
+ /* Dtrace probe declarations */
+ #define HS_DTRACE_PROBE_DECL(provider,name) \
+@@ -88,6 +101,8 @@
+ uintptr_t,uintptr_t,uintptr_t))
+
+ /* Dtrace probe definitions */
++#if defined(SOLARIS)
++// Solaris dtrace uses actual function calls.
+ #define HS_DTRACE_PROBE_N(provider,name, args) \
+ DTRACE_ONLY(HS_DTRACE_PROBE_FN(provider,name) args)
+
+@@ -123,3 +138,29 @@
+ HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\
+ (uintptr_t)a3,(uintptr_t)a4,(uintptr_t)a5,(uintptr_t)a6,(uintptr_t)a7,\
+ (uintptr_t)a8,(uintptr_t)a9))
++#else
++// Systemtap dtrace compatible probes on GNU/Linux use direct macros.
++#define HS_DTRACE_PROBE(provider,name) HS_DTRACE_PROBE0(provider,name)
++#define HS_DTRACE_PROBE0(provider,name)\
++ DTRACE_PROBE(provider,name)
++#define HS_DTRACE_PROBE1(provider,name,a0)\
++ DTRACE_PROBE1(provider,name,a0)
++#define HS_DTRACE_PROBE2(provider,name,a0,a1)\
++ DTRACE_PROBE2(provider,name,a0,a1)
++#define HS_DTRACE_PROBE3(provider,name,a0,a1,a2)\
++ DTRACE_PROBE3(provider,name,a0,a1,a2)
++#define HS_DTRACE_PROBE4(provider,name,a0,a1,a2,a3)\
++ DTRACE_PROBE4(provider,name,a0,a1,a2,a3)
++#define HS_DTRACE_PROBE5(provider,name,a0,a1,a2,a3,a4)\
++ DTRACE_PROBE5(provider,name,a0,a1,a2,a3,a4)
++#define HS_DTRACE_PROBE6(provider,name,a0,a1,a2,a3,a4,a5)\
++ DTRACE_PROBE6(provider,name,a0,a1,a2,a3,a4,a5)
++#define HS_DTRACE_PROBE7(provider,name,a0,a1,a2,a3,a4,a5,a6)\
++ DTRACE_PROBE7(provider,name,a0,a1,a2,a3,a4,a5,a6)
++#define HS_DTRACE_PROBE8(provider,name,a0,a1,a2,a3,a4,a5,a6,a7)\
++ DTRACE_PROBE8(provider,name,a0,a1,a2,a3,a4,a5,a6,a7)
++#define HS_DTRACE_PROBE9(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8)\
++ DTRACE_PROBE9(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8)
++#define HS_DTRACE_PROBE10(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8)\
++ DTRACE_PROBE10(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8)
++#endif
+--- openjdk/hotspot/src/share/vm/runtime/arguments.cpp 2009-03-04 14:39:43.000000000 +0100
++++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp 2009-03-04 22:11:37.000000000 +0100
+@@ -2272,16 +2272,16 @@
+ FLAG_SET_CMDLINE(bool, DisplayVMOutputToStderr, false);
+ FLAG_SET_CMDLINE(bool, DisplayVMOutputToStdout, true);
+ } else if (match_option(option, "-XX:+ExtendedDTraceProbes", &tail)) {
+-#ifdef SOLARIS
++#ifdef DTRACE_ENABLED
+ FLAG_SET_CMDLINE(bool, ExtendedDTraceProbes, true);
+ FLAG_SET_CMDLINE(bool, DTraceMethodProbes, true);
+ FLAG_SET_CMDLINE(bool, DTraceAllocProbes, true);
+ FLAG_SET_CMDLINE(bool, DTraceMonitorProbes, true);
+-#else // ndef SOLARIS
++#else // ndef DTRACE_ENABLED
+ jio_fprintf(defaultStream::error_stream(),
+- "ExtendedDTraceProbes flag is only applicable on Solaris\n");
++ "ExtendedDTraceProbes flag is only applicable on dtrace enabled builds\n");
+ return JNI_EINVAL;
+-#endif // ndef SOLARIS
++#endif // ndef DTRACE_ENABLED
+ } else
+ #ifdef ASSERT
+ if (match_option(option, "-XX:+FullGCALot", &tail)) {
diff -r 924928f21072 -r d48a4f542e7d patches/hotspot/original/icedtea-format.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/original/icedtea-format.patch Tue Mar 30 23:04:54 2010 +0100
@@ -0,0 +1,48 @@
+diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp
+--- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp 2010-03-11 14:46:20.000000000 +0000
++++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp 2010-03-11 17:20:52.000000000 +0000
+@@ -1268,7 +1268,7 @@
+
+ // Feed the cache size setting into the JDK
+ char buffer[1024];
+- sprintf(buffer, "java.lang.Integer.IntegerCache.high=%d", AutoBoxCacheMax);
++ sprintf(buffer, "java.lang.Integer.IntegerCache.high=" INTX_FORMAT, AutoBoxCacheMax);
+ add_property(buffer);
+ }
+ #endif
+diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/safepoint.cpp openjdk/hotspot/src/share/vm/runtime/safepoint.cpp
+--- openjdk.orig/hotspot/src/share/vm/runtime/safepoint.cpp 2009-04-24 08:30:57.000000000 +0100
++++ openjdk/hotspot/src/share/vm/runtime/safepoint.cpp 2010-03-11 17:20:52.000000000 +0000
+@@ -733,7 +733,7 @@
+ if (DieOnSafepointTimeout) {
+ char msg[1024];
+ VM_Operation *op = VMThread::vm_operation();
+- sprintf(msg, "Safepoint sync time longer than %d ms detected when executing %s.",
++ sprintf(msg, "Safepoint sync time longer than " INTX_FORMAT " ms detected when executing %s.",
+ SafepointTimeoutDelay,
+ op != NULL ? op->name() : "no vm operation");
+ fatal(msg);
+diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/synchronizer.cpp openjdk/hotspot/src/share/vm/runtime/synchronizer.cpp
+--- openjdk.orig/hotspot/src/share/vm/runtime/synchronizer.cpp 2009-04-24 08:30:57.000000000 +0100
++++ openjdk/hotspot/src/share/vm/runtime/synchronizer.cpp 2010-03-11 17:21:19.000000000 +0000
+@@ -427,7 +427,7 @@
+ // asserts is that error message -- often something about negative array
+ // indices -- is opaque.
+
+-#define CTASSERT(x) { int tag[1-(2*!(x))]; printf ("Tag @%X\n", tag); }
++#define CTASSERT(x) { int tag[1-(2*!(x))]; printf ("Tag @%p\n", tag); }
+
+ void ObjectMonitor::ctAsserts() {
+ CTASSERT(offset_of (ObjectMonitor, _header) == 0);
+diff -Nru openjdk.orig/hotspot/src/share/vm/utilities/vmError.cpp openjdk/hotspot/src/share/vm/utilities/vmError.cpp
+--- openjdk.orig/hotspot/src/share/vm/utilities/vmError.cpp 2010-03-11 14:46:19.000000000 +0000
++++ openjdk/hotspot/src/share/vm/utilities/vmError.cpp 2010-03-11 17:20:52.000000000 +0000
+@@ -313,7 +313,7 @@
+
+ strncpy(buf, file, buflen);
+ if (len + 10 < buflen) {
+- sprintf(buf + len, ":" SIZE_FORMAT, _lineno);
++ sprintf(buf + len, ":%d", _lineno);
+ }
+ st->print(" (%s)", buf);
+ } else {
diff -r 924928f21072 -r d48a4f542e7d patches/hotspot/original/systemtap.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/original/systemtap.patch Tue Mar 30 23:04:54 2010 +0100
@@ -0,0 +1,154 @@
+diff -Nru ../openjdk.orig/hotspot/build/linux/makefiles/dtrace.make ../openjdk/hotspot/build/linux/makefiles/dtrace.make
+--- ../openjdk.orig/hotspot/build/linux/makefiles/dtrace.make 2009-04-24 08:30:52.000000000 +0100
++++ ../openjdk/hotspot/build/linux/makefiles/dtrace.make 2010-03-30 20:43:06.000000000 +0100
+@@ -25,3 +25,7 @@
+ # Linux does not build jvm_db
+ LIBJVM_DB =
+
++# But it does have a Systemtap dtrace compatible sys/sdt.h
++CFLAGS += -DDTRACE_ENABLED
++
++# It doesn't support HAVE_DTRACE_H though.
+diff -Nru ../openjdk.orig/hotspot/src/share/vm/prims/jni.cpp ../openjdk/hotspot/src/share/vm/prims/jni.cpp
+--- ../openjdk.orig/hotspot/src/share/vm/prims/jni.cpp 2010-03-30 20:41:19.000000000 +0100
++++ ../openjdk/hotspot/src/share/vm/prims/jni.cpp 2010-03-30 20:43:06.000000000 +0100
+@@ -1744,10 +1744,7 @@
+ JNI_QUICK_ENTRY(void, jni_Set##Result##Field(JNIEnv *env, jobject obj, jfieldID fieldID, Argument value)) \
+ JNIWrapper("Set" XSTR(Result) "Field"); \
+ \
+- HS_DTRACE_PROBE_CDECL_N(hotspot_jni, Set##Result##Field__entry, \
+- ( JNIEnv*, jobject, jfieldID FP_SELECT_##Result(COMMA Argument,/*empty*/) ) ); \
+- HS_DTRACE_PROBE_N(hotspot_jni, Set##Result##Field__entry, \
+- ( env, obj, fieldID FP_SELECT_##Result(COMMA value,/*empty*/) ) ); \
++ FP_SELECT_##Result(DTRACE_PROBE4(hotspot_jni, Set##Result##Field__entry, env, obj, fieldID, value),DTRACE_PROBE3(hotspot_jni, Set##Result##Field__entry, env, obj, fieldID)); \
+ \
+ oop o = JNIHandles::resolve_non_null(obj); \
+ klassOop k = o->klass(); \
+@@ -1921,10 +1918,7 @@
+ \
+ JNI_ENTRY(void, jni_SetStatic##Result##Field(JNIEnv *env, jclass clazz, jfieldID fieldID, Argument value)) \
+ JNIWrapper("SetStatic" XSTR(Result) "Field"); \
+- HS_DTRACE_PROBE_CDECL_N(hotspot_jni, SetStatic##Result##Field__entry,\
+- ( JNIEnv*, jclass, jfieldID FP_SELECT_##Result(COMMA Argument,/*empty*/) ) ); \
+- HS_DTRACE_PROBE_N(hotspot_jni, SetStatic##Result##Field__entry, \
+- ( env, clazz, fieldID FP_SELECT_##Result(COMMA value,/*empty*/) ) ); \
++ FP_SELECT_##Result(DTRACE_PROBE4(hotspot_jni, SetStatic##Result##Field__entry, env, clazz, fieldID, value),DTRACE_PROBE3(hotspot_jni, SetStatic##Result##Field__entry, env, clazz, fieldID)); \
+ \
+ JNIid* id = jfieldIDWorkaround::from_static_jfieldID(fieldID); \
+ assert(id->is_static_field_id(), "invalid static field id"); \
+@@ -2107,7 +2101,7 @@
+ DT_RETURN_MARK(GetObjectArrayElement, jobject, (const jobject&)ret);
+ objArrayOop a = objArrayOop(JNIHandles::resolve_non_null(array));
+ if (a->is_within_bounds(index)) {
+- jobject ret = JNIHandles::make_local(env, a->obj_at(index));
++ ret = JNIHandles::make_local(env, a->obj_at(index));
+ return ret;
+ } else {
+ char buf[jintAsStringSize];
+@@ -2141,14 +2135,14 @@
+
+ #define DEFINE_NEWSCALARARRAY(Return,Allocator,Result) \
+ \
+- DT_RETURN_MARK_DECL_FOR(Result, New##Result##Array, Return);\
++ DT_RETURN_MARK_DECL(New##Result##Array, Return);\
+ \
+ JNI_ENTRY(Return, \
+ jni_New##Result##Array(JNIEnv *env, jsize len)) \
+ JNIWrapper("New" XSTR(Result) "Array"); \
+ DTRACE_PROBE2(hotspot_jni, New##Result##Array__entry, env, len);\
+ Return ret = NULL;\
+- DT_RETURN_MARK_FOR(Result, New##Result##Array, Return, (const Return&)ret);\
++ DT_RETURN_MARK(New##Result##Array, Return, (const Return&)ret);\
+ \
+ oop obj= oopFactory::Allocator(len, CHECK_0); \
+ ret = (Return) JNIHandles::make_local(env, obj); \
+diff -Nru ../openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp ../openjdk/hotspot/src/share/vm/runtime/arguments.cpp
+--- ../openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp 2010-03-30 20:41:21.000000000 +0100
++++ ../openjdk/hotspot/src/share/vm/runtime/arguments.cpp 2010-03-30 20:43:54.000000000 +0100
+@@ -2164,16 +2164,16 @@
+ FLAG_SET_CMDLINE(bool, DisplayVMOutputToStderr, false);
+ FLAG_SET_CMDLINE(bool, DisplayVMOutputToStdout, true);
+ } else if (match_option(option, "-XX:+ExtendedDTraceProbes", &tail)) {
+-#ifdef SOLARIS
++#ifdef DTRACE_ENABLED
+ FLAG_SET_CMDLINE(bool, ExtendedDTraceProbes, true);
+ FLAG_SET_CMDLINE(bool, DTraceMethodProbes, true);
+ FLAG_SET_CMDLINE(bool, DTraceAllocProbes, true);
+ FLAG_SET_CMDLINE(bool, DTraceMonitorProbes, true);
+-#else // ndef SOLARIS
++#else // ndef DTRACE_ENABLED
+ jio_fprintf(defaultStream::error_stream(),
+- "ExtendedDTraceProbes flag is only applicable on Solaris\n");
++ "ExtendedDTraceProbes flag is only applicable on dtrace enabled builds\n");
+ return JNI_EINVAL;
+-#endif // ndef SOLARIS
++#endif // ndef DTRACE_ENABLED
+ } else
+ #ifdef ASSERT
+ if (match_option(option, "-XX:+FullGCALot", &tail)) {
+diff -Nru ../openjdk.orig/hotspot/src/share/vm/utilities/dtrace.hpp ../openjdk/hotspot/src/share/vm/utilities/dtrace.hpp
+--- ../openjdk.orig/hotspot/src/share/vm/utilities/dtrace.hpp 2009-04-24 08:30:57.000000000 +0100
++++ ../openjdk/hotspot/src/share/vm/utilities/dtrace.hpp 2010-03-30 20:43:06.000000000 +0100
+@@ -3,6 +3,7 @@
+ #endif
+ /*
+ * Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved.
++ * Copyright 2009 Red Hat, Inc.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+@@ -25,14 +26,14 @@
+ *
+ */
+
+-#if defined(SOLARIS) && defined(DTRACE_ENABLED)
++#if defined(DTRACE_ENABLED)
+
+ #include <sys/sdt.h>
+
+ #define DTRACE_ONLY(x) x
+ #define NOT_DTRACE(x)
+
+-#else // ndef SOLARIS || ndef DTRACE_ENABLED
++#else // ndef DTRACE_ENABLED
More information about the distro-pkg-dev
mailing list