mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
6294277: java -Xdebug crashes on SourceDebugExtension attribute larger than 64K
Reviewed-by: sspitsyn, dholmes, coleenp, kamg
This commit is contained in:
parent
39dfe6d047
commit
13c689d9c3
12 changed files with 273 additions and 35 deletions
|
@ -2337,12 +2337,7 @@ void ClassFileParser::parse_classfile_source_debug_extension_attribute(constantP
|
|||
|
||||
// Don't bother storing it if there is no way to retrieve it
|
||||
if (JvmtiExport::can_get_source_debug_extension()) {
|
||||
// Optimistically assume that only 1 byte UTF format is used
|
||||
// (common case)
|
||||
TempNewSymbol sde_symbol = SymbolTable::new_symbol((const char*)sde_buffer, length, CHECK);
|
||||
k->set_source_debug_extension(sde_symbol);
|
||||
// Note that set_source_debug_extension() increments the reference count
|
||||
// for its copy of the Symbol*, so use a TempNewSymbol here.
|
||||
k->set_source_debug_extension((char*)sde_buffer, length);
|
||||
}
|
||||
// Got utf8 string, set stream position forward
|
||||
cfs->skip_u1(length, CHECK);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue