Mercurial > hg > truffle
comparison src/share/vm/classfile/classFileParser.cpp @ 6203:04ade88d9712
6294277: java -Xdebug crashes on SourceDebugExtension attribute larger than 64K
Reviewed-by: sspitsyn, dholmes, coleenp, kamg
author | fparain |
---|---|
date | Mon, 09 Jul 2012 01:28:37 -0700 |
parents | d2a62e0f25eb |
children | e74da3c2b827 9c9fb30d2b3b |
comparison
equal
deleted
inserted
replaced
6202:5a1f452f8f90 | 6203:04ade88d9712 |
---|---|
2335 u1* sde_buffer = cfs->get_u1_buffer(); | 2335 u1* sde_buffer = cfs->get_u1_buffer(); |
2336 assert(sde_buffer != NULL, "null sde buffer"); | 2336 assert(sde_buffer != NULL, "null sde buffer"); |
2337 | 2337 |
2338 // Don't bother storing it if there is no way to retrieve it | 2338 // Don't bother storing it if there is no way to retrieve it |
2339 if (JvmtiExport::can_get_source_debug_extension()) { | 2339 if (JvmtiExport::can_get_source_debug_extension()) { |
2340 // Optimistically assume that only 1 byte UTF format is used | 2340 k->set_source_debug_extension((char*)sde_buffer, length); |
2341 // (common case) | |
2342 TempNewSymbol sde_symbol = SymbolTable::new_symbol((const char*)sde_buffer, length, CHECK); | |
2343 k->set_source_debug_extension(sde_symbol); | |
2344 // Note that set_source_debug_extension() increments the reference count | |
2345 // for its copy of the Symbol*, so use a TempNewSymbol here. | |
2346 } | 2341 } |
2347 // Got utf8 string, set stream position forward | 2342 // Got utf8 string, set stream position forward |
2348 cfs->skip_u1(length, CHECK); | 2343 cfs->skip_u1(length, CHECK); |
2349 } | 2344 } |
2350 | 2345 |