Name: akC45999 Date: 08/18/97
Every java object contains counter which reflects number of lock actions
performed with this method. Evidently, this counter is limited (in Sun's
JDK 1.0 - 16 bit, JDK1.1 - 32 bit). But the specification does not set the
limit on the number allowed lock actions, so both implementations,
being practically usable, do not comply with the specification, simply
because such specification cannot be implemented. Even if counters of
variable length are used (which is very impractical), growing number
of lock actions performed will cause OutOfMemoryException, which is
not allowed with the spec.
A limit must be established in the description of monitorenter instruction,
and JVM's reaction to the limit overflow should be defined.