diff src/share/vm/oops/instanceKlass.hpp @ 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 957c266d8bc5 da91efe96a93
line wrap: on
line diff
--- a/src/share/vm/oops/instanceKlass.hpp	Thu Jun 28 11:37:28 2012 +0200
+++ b/src/share/vm/oops/instanceKlass.hpp	Mon Jul 09 01:28:37 2012 -0700
@@ -226,7 +226,9 @@
   // Name of source file containing this klass, NULL if not specified.
   Symbol*         _source_file_name;
   // the source debug extension for this klass, NULL if not specified.
-  Symbol*         _source_debug_extension;
+  // Specified as UTF-8 string without terminating zero byte in the classfile,
+  // it is stored in the instanceklass as a NULL-terminated UTF-8 string
+  char*           _source_debug_extension;
   // Generic signature, or null if none.
   Symbol*         _generic_signature;
   // Array name derived from this class which needs unreferencing
@@ -542,8 +544,8 @@
   void set_major_version(u2 major_version) { _major_version = major_version; }
 
   // source debug extension
-  Symbol* source_debug_extension() const   { return _source_debug_extension; }
-  void set_source_debug_extension(Symbol* n);
+  char* source_debug_extension() const     { return _source_debug_extension; }
+  void set_source_debug_extension(char* array, int length);
 
   // symbol unloading support (refcount already added)
   Symbol* array_name()                     { return _array_name; }