Re: RFR: 8266187: Memory leak in appendBootClassPath() [v2]

2021-04-30 Thread Wang Huang
> Dear All, > I find a memory leak in `appendBootClassPath()` > https://github.com/openjdk/jdk/blob/75a2354dc276e107d64516d20fc72bc7ef3d5f86/src/java.instrument/share/native/libinstrument/InvocationAdapter.c#L950 > * we malloc `resolved` from resolve(parent, path) > * we use `resolved` in line

Re: RFR: 8266187: Memory leak in appendBootClassPath()

2021-04-30 Thread Wang Huang
On Fri, 30 Apr 2021 10:17:42 GMT, Kevin Walls wrote: > Oops - please update the copyright year, thanks! (second year in the header > is currently 2019, should become 2021). Thank you for your suggestion. I have update that. - PR: https://git.openjdk.java.net/jdk/pull/3751

Re: RFR: 8266187: Memory leak in appendBootClassPath()

2021-04-30 Thread Alan Bateman
On Wed, 28 Apr 2021 06:38:57 GMT, Wang Huang wrote: > Dear All, > I find a memory leak in `appendBootClassPath()` > https://github.com/openjdk/jdk/blob/75a2354dc276e107d64516d20fc72bc7ef3d5f86/src/java.instrument/share/native/libinstrument/InvocationAdapter.c#L950 > * we malloc `resolved` fr

Re: RFR: 8266187: Memory leak in appendBootClassPath()

2021-04-30 Thread Kevin Walls
On Wed, 28 Apr 2021 06:38:57 GMT, Wang Huang wrote: > Dear All, > I find a memory leak in `appendBootClassPath()` > https://github.com/openjdk/jdk/blob/75a2354dc276e107d64516d20fc72bc7ef3d5f86/src/java.instrument/share/native/libinstrument/InvocationAdapter.c#L950 > * we malloc `resolved` fr

Re: RFR: 8266187: Memory leak in appendBootClassPath()

2021-04-29 Thread Hamlin Li
On Wed, 28 Apr 2021 06:38:57 GMT, Wang Huang wrote: > Dear All, > I find a memory leak in `appendBootClassPath()` > https://github.com/openjdk/jdk/blob/75a2354dc276e107d64516d20fc72bc7ef3d5f86/src/java.instrument/share/native/libinstrument/InvocationAdapter.c#L950 > * we malloc `resolved` fr

Re: RFR: 8266187: Memory leak in appendBootClassPath()

2021-04-28 Thread Wang Huang
On Wed, 28 Apr 2021 12:17:18 GMT, Kevin Walls wrote: > Hi, > I didn't find it immediately obvious that this was safe, but I followed > things and think that it is correct: > > The malloc'd pointer gets passed to... > JvmtiEnv::AddToBootstrapClassLoaderSearch(const char* segment) { > > which ca

Re: RFR: 8266187: Memory leak in appendBootClassPath()

2021-04-28 Thread Kevin Walls
On Wed, 28 Apr 2021 06:38:57 GMT, Wang Huang wrote: > Dear All, > I find a memory leak in `appendBootClassPath()` > https://github.com/openjdk/jdk/blob/75a2354dc276e107d64516d20fc72bc7ef3d5f86/src/java.instrument/share/native/libinstrument/InvocationAdapter.c#L950 > * we malloc `resolved` fr

Re: RFR: 8266187: Memory leak in appendBootClassPath()

2021-04-28 Thread Kevin Walls
On Wed, 28 Apr 2021 06:38:57 GMT, Wang Huang wrote: > Dear All, > I find a memory leak in `appendBootClassPath()` > https://github.com/openjdk/jdk/blob/75a2354dc276e107d64516d20fc72bc7ef3d5f86/src/java.instrument/share/native/libinstrument/InvocationAdapter.c#L950 > * we malloc `resolved` fr

RFR: 8266187: Memory leak in appendBootClassPath()

2021-04-27 Thread Wang Huang
Dear All, I find a memory leak in `appendBootClassPath()` https://github.com/openjdk/jdk/blob/75a2354dc276e107d64516d20fc72bc7ef3d5f86/src/java.instrument/share/native/libinstrument/InvocationAdapter.c#L950 we malloc `resolved` from resolve(parent, path) * we use `resolved` in line 951 * w