mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-25 13:54:38 +02:00
8054292: code comments leak in fastdebug builds
Added deallocation to destructor; hardened interface against misuse Reviewed-by: kvn
This commit is contained in:
parent
3eb44b3955
commit
4c9f643e10
5 changed files with 81 additions and 11 deletions
|
@ -246,12 +246,12 @@ class decode_env {
|
|||
};
|
||||
|
||||
decode_env::decode_env(CodeBlob* code, outputStream* output, CodeStrings c) {
|
||||
memset(this, 0, sizeof(*this));
|
||||
memset(this, 0, sizeof(*this)); // Beware, this zeroes bits of fields.
|
||||
_output = output ? output : tty;
|
||||
_code = code;
|
||||
if (code != NULL && code->is_nmethod())
|
||||
_nm = (nmethod*) code;
|
||||
_strings.assign(c);
|
||||
_strings.copy(c);
|
||||
|
||||
// by default, output pc but not bytes:
|
||||
_print_pc = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue