Integrated: 8284620: CodeBuffer may leak _overflow_arena
Zhengyu Gu
zgu at openjdk.java.net
Mon Apr 11 19:07:46 UTC 2022
On Sat, 9 Apr 2022 16:01:40 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:
> `CodeBuffer` is declared as `StackObj`, but it also has `ResourceObj` style `new operator`, to complicate thing further more, it has _overflow_arena that is C Heap allocated.
>
> When Stack allocated `CodeBuffer` owns `_overflow_arena`, it works fine, because its destructor frees `_overflow_arena`. But if resource allocated `CodeBuffer` owns `_overflow_arena`, the arena is leaked, because its destructor is never called.
>
> Test:
> - [x] hotspot_compiler on Linux x86_64
This pull request has now been integrated.
Changeset: 4d45c3eb
Author: Zhengyu Gu <zgu at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/4d45c3ebc493bb2c85dab84b97840c8ba093ab1f
Stats: 7 lines in 1 file changed: 3 ins; 3 del; 1 mod
8284620: CodeBuffer may leak _overflow_arena
Reviewed-by: thartmann, kvn
-------------
PR: https://git.openjdk.java.net/jdk/pull/8172
More information about the hotspot-compiler-dev
mailing list