diff options
| author | Jung-uk Kim <jkim@FreeBSD.org> | 2012-10-19 22:43:10 +0000 |
|---|---|---|
| committer | Jung-uk Kim <jkim@FreeBSD.org> | 2012-10-19 22:43:10 +0000 |
| commit | 81a8a55b63815f66e325d8ba0051a10e48f90bd1 (patch) | |
| tree | 583a72c17d448ec15fd905bf3467d0378376c4de /java/openjdk6/files/icedtea/security/7195919.patch | |
| parent | Update to 7u9. (diff) | |
- Add 2012/10/16 security patches from IcedTea6 1.11.5. [1]
http://icedtea.classpath.org/hg/release/icedtea6-1.11/rev/d9564350faa6
http://blog.fuseyism.com/index.php/2012/10/19/security-icedtea-1-10-10-1-11-15-2-1-3-2-2-3-2-3-3-released/
- Completely turn off parallel build by default and remove parallel build
hack for HotSpot. There were several reports that it fails to build under
certain environment, ports/162991 for example. Users can still do parallel
build by setting FORCE_MAKE_JOBS (and MAKE_JOBS_NUMBER if desired).
- Implement os::available_memory(). Now it is consistent with "vm.vmtotal"
sysctl(3) MIB rather than bogus (physical memory / 4).
- Prefer sysconf(_SC_NPROCESSORS_CONF) over HW_NCPU sysctl MIB to get the
number of installed processors. There is no functional difference except
for CURRENT, which obtains the information from ELF aux vector.
- Prefer sysconf(_SC_PHYS_PAGES) * sysconf(_SC_PAGESIZE) over HW_USERMEM
sysctl MIB to get size of physical memory. Although it looks more logical
to find currently available memory, it has an inevitable side-effect, i. e.,
it changes dynamically depending on current wired page count. Therefore,
it is unpredictable and not too useful some times. For example, launcher
uses the parameter to determine initial heap size and machine class for i386.
Now it is more consistent with other places (and Linux JDK/JREs, including
the ones we have in ports tree).
- Implement os::active_processor_count() using cpuset_getaffinity(2). For
example, Runtime.getRuntime().availableProcessors() now returns number of
available processors for the current process as it should.
- Sync. launchers (java_md.c) for HotSpot and JDK as much as possible for
maintainability. As a good side-effect, launcher for i386 can now determine
machine class based on the current hardware configuration. Previously,
client VM was always chosen by default.
- Fix CounterGet(), which is only used for debugging launcher.
- Add swap info for os::print_memory_info().
Obtained from: IcedTea project [1]
Feature safe: yes
Diffstat (limited to 'java/openjdk6/files/icedtea/security/7195919.patch')
| -rw-r--r-- | java/openjdk6/files/icedtea/security/7195919.patch | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/java/openjdk6/files/icedtea/security/7195919.patch b/java/openjdk6/files/icedtea/security/7195919.patch new file mode 100644 index 000000000000..2d14c00701b8 --- /dev/null +++ b/java/openjdk6/files/icedtea/security/7195919.patch @@ -0,0 +1,63 @@ +# HG changeset patch +# User dmeetry +# Date 1347313661 -14400 +# Node ID 5352a40bb0ff7e8a6e826478d7687fff695d9805 +# Parent 074f132d65c91231ca989e4c757207e1cf25a476 +7195919: (sl) ServiceLoader can throw CCE without needing to create instance +Reviewed-by: smarks + +diff --git a/src/share/classes/java/util/ServiceLoader.java b/src/share/classes/java/util/ServiceLoader.java +--- jdk/src/share/classes/java/util/ServiceLoader.java ++++ jdk/src/share/classes/java/util/ServiceLoader.java +@@ -358,14 +358,21 @@ + } + String cn = nextName; + nextName = null; ++ Class<?> c = null; + try { +- S p = service.cast(Class.forName(cn, true, loader) +- .newInstance()); +- providers.put(cn, p); +- return p; ++ c = Class.forName(cn, false, loader); + } catch (ClassNotFoundException x) { + fail(service, + "Provider " + cn + " not found"); ++ } ++ if (!service.isAssignableFrom(c)) { ++ fail(service, ++ "Provider " + cn + " not a subtype"); ++ } ++ try { ++ S p = service.cast(c.newInstance()); ++ providers.put(cn, p); ++ return p; + } catch (Throwable x) { + fail(service, + "Provider " + cn + " could not be instantiated: " + x, +diff --git a/src/share/classes/sun/misc/Service.java b/src/share/classes/sun/misc/Service.java +--- jdk/src/share/classes/sun/misc/Service.java ++++ jdk/src/share/classes/sun/misc/Service.java +@@ -284,12 +284,20 @@ + } + String cn = nextName; + nextName = null; ++ Class<?> c = null; + try { +- return Class.forName(cn, true, loader).newInstance(); ++ c = Class.forName(cn, false, loader); + } catch (ClassNotFoundException x) { + fail(service, + "Provider " + cn + " not found"); +- } catch (Exception x) { ++ } ++ if (!service.isAssignableFrom(c)) { ++ fail(service, ++ "Provider " + cn + " not a subtype"); ++ } ++ try { ++ return service.cast(c.newInstance()); ++ } catch (Throwable x) { + fail(service, + "Provider " + cn + " could not be instantiated: " + x, + x); |
