JDK-4186369 : (1.1) change 32K string table limit to 64K
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.1.7
  • Priority: P5
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic,windows_nt
  • CPU: x86
  • Submitted: 1998-11-02
  • Updated: 1999-07-30
  • Resolved: 1999-07-30
Related Reports
Duplicate :  
Duplicate :  
Description
In the fix for 4103243 a limit of 32000 entries was placed on
size of the string tables in JDK1.1.7.

One licensee has an app that overruns this limit. In particular
the size of the app is such that the number of names and types
exceeds the limit. There is no easy workaround for this.

The size of the relevant data structure is 16 bits therefore
it should be possible to accomodate 64K entries.

Comments
PUBLIC COMMENTS .
10-06-2004

SUGGESTED FIX In share/java/util/util.c function Str2ID() change the check on the baseid from 32000 to 64K. Following is the src diffs for this fix: /share/java/util/util.c 2c2 < * @(#)util.c 1.52 98/07/14 --- > * %W% %E% 157c157 < short baseid; /* ID for item in slot[0] */ --- > unsigned short baseid; /* ID for item in slot[0] */ 267,268c267,268 < if (h && h->baseid > 32000 && h != stringHash) { < panic("16-bit string hash table overflow"); --- > if (h && h->baseid > 64000 && *hash_ptr != stringHash) { > panic("16-bit nametype hash table overflow"); 409c409 < while ((long)(ID - h->baseid) >= h->size) { --- > while (ID >= (h->baseid + h->size)) { ###@###.### 1999-07-30
30-07-1999

EVALUATION I'm concerned about the risks involved in allowing up to 64K IDs. In various places in the VM, IDs are 16-bit *signed* integers, we'll need to make sure the sign does not matter in all cases, which I'm not sure we can confidently do. sheng.liang@Eng 1999-03-04 The best course for those affected by this bug is to upgrade to use the Java 2 SDK (Formerly code named JDK 1.2), which is not subject to the limitation in this bug report. Available from: http://java.sun.com/products/jdk/1.2/index.html tim.bell@Eng 1999-03-05 I think check the ID check from 32k to 64k in Str2ID is risky. As the baseid is *signed* 16bit value, so the check of (baseid > 64k) is always false which means the condition of the check couldn't be met. I think one of the way to fix the problem is to change the IDs type from 16bit to 32bit value, so the number of user created strings does not have the limitation of 32k. ###@###.### 1999-03-25
25-03-1999