Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8230527

ThreadLocal setThreshold can overflow int range

XMLWordPrintable

    • generic
    • generic

      ADDITIONAL SYSTEM INFORMATION :
      Should infect all

      A DESCRIPTION OF THE PROBLEM :
      when len is a large number (2^30), len * 2 / 3 overflows. Should use long to compute intermediate value.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Hard to reproduce, need large memory. Create sufficient thread locals will overflow

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Should not overflow
      ACTUAL -
      Didn't succeed to reproduce because ran out of memory.

      CUSTOMER SUBMITTED WORKAROUND :
      Don't use too many thread local vars.

      FREQUENCY : rarely


            chegar Chris Hegarty
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: