RFR: 6294277 java -Xdebug crashes on SourceDebugExtension attribute larger than 64K
frederic.parain at oracle.com
Fri Jul 6 06:35:41 PDT 2012
Thanks Serguei and David for the review.
The two cast issues have been fixed.
Regarding the SA, the changeset includes the modifications
required to support the changes done in the JVM.
Code relying on the sun.jvm.hotspot.jdi.SDE class won't see
any difference. Code using directly the
sun.jvm.hotspot.oops.InstanceKlass class will require
some modifications because I had to change the return type
of one method.
Note that the actual support of the SourceDebugExtension
in the SA has its own limitations. The SA code stores
the attribute in a String with a size limit lower than
the size limit of the SourceDebugExtension (signed
32-bits value versus unsigned 32-bits value). I didn't
fix this limitation because it requires the introduction
of more complex data structures and it is really unlikely
to find a SourceDebugExtension attribute bigger than 2GB.
On 07/ 5/12 06:32 PM, serguei.spitsyn at oracle.com wrote:
> Hi Frederic,
> Thank you a lot for fixing this issue!
> The fix looks good, just a couple of nits below.
> I also wonder if the SA cares about this attribute.
> If so, it'd make sense to file a bug.
> (1) Nit: I guess, the type should be char, not u1:
> 1949 if (_source_debug_extension != NULL) FREE_C_HEAP_ARRAY(u1,
> _source_debug_extension, mtClass);
> (2) Nit: No need to cast at 1971:
> 1966 char* sde = NEW_C_HEAP_ARRAY(char, (length + 1), mtClass);
> . . .
> 1971 _source_debug_extension = (char*)sde;
> On 7/5/12 5:22 AM, Frederic Parain wrote:
>> The bug is described in details in the CR below.
>> CR: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6294277
>> Webrev: http://cr.openjdk.java.net/~fparain/6294277/webrev.00/
>> Tested with JPRT, sajdi and quick-jvmti.
Frederic Parain - Oracle
Grenoble Engineering Center - France
Phone: +33 4 76 18 81 17
Email: Frederic.Parain at Oracle.com
More information about the hotspot-runtime-dev