~ubuntu-branches/debian/sid/tomcat6/sid

« back to all changes in this revision

Viewing changes to java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java

  • Committer: Package Import Robot
  • Author(s): tony mancill
  • Date: 2013-08-03 21:50:20 UTC
  • mfrom: (1.2.9)
  • Revision ID: package-import@ubuntu.com-20130803215020-glb1brkoau0zxr5x
Tags: 6.0.37-1
* New upstream release.
  - Drop patches for CVE-2012-4534, CVE-2012-4431, CVE-2012-3546,
    CVE-2012-2733, CVE-2012-3439
  - Drop 0011-CVE-02012-0022-regression-fix.patch
  - Drop 0017-eclipse-compiler-update.patch
* Freshened remaining patches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
249
249
                if(awtThreadProtection) {
250
250
                  java.awt.Toolkit.getDefaultToolkit();
251
251
                }
252
 
                
 
252
 
253
253
                /*
254
 
                 * Several components end up calling:
255
 
                 * sun.misc.GC.requestLatency(long)
 
254
                 * Several components end up calling
 
255
                 * sun.misc.GC.requestLatency(long) which creates a daemon
 
256
                 * thread without setting the TCCL.
256
257
                 * 
257
258
                 * Those libraries / components known to trigger memory leaks
258
259
                 * due to eventual calls to requestLatency(long) are:
259
260
                 * - javax.management.remote.rmi.RMIConnectorServer.start()
 
261
                 *
 
262
                 * Note: Long.MAX_VALUE is a special case that causes the thread
 
263
                 *       to terminate
 
264
                 *
260
265
                 */
261
266
                if (gcDaemonProtection) {
262
267
                    try {
264
269
                        Method method = clazz.getDeclaredMethod(
265
270
                                "requestLatency",
266
271
                                new Class[] {long.class});
267
 
                        method.invoke(null, Long.valueOf(3600000));
 
272
                        method.invoke(null, Long.valueOf(Long.MAX_VALUE - 1));
268
273
                    } catch (ClassNotFoundException e) {
269
274
                        if (System.getProperty("java.vendor").startsWith(
270
275
                                "Sun")) {