Re: RFR: JDK-8297688: libjli leaks memory related to options handling

2022-11-27 Thread Justin King
On Mon, 28 Nov 2022 03:23:01 GMT, Justin King wrote: > Fix memory leaks by making `AddOption` unconditionally duplicate passed in > strings, taking ownership. Callers using dynamic memory free their storage > after calling `AddOption`. This ensures no memory is dropped on the floor. > This

Re: RFR: JDK-8297688: libjli leaks memory related to options handling

2022-11-27 Thread David Holmes
On Mon, 28 Nov 2022 03:23:01 GMT, Justin King wrote: > Fix memory leaks by making `AddOption` unconditionally duplicate passed in > strings, taking ownership. Callers using dynamic memory free their storage > after calling `AddOption`. This ensures no memory is dropped on the floor. > This

Re: RFR: JDK-8297688: libjli leaks memory related to options handling

2022-11-27 Thread Justin King
On Mon, 28 Nov 2022 04:02:33 GMT, David Holmes wrote: > Doesn't this just "leak" the duplicated string now instead of the original? No, this frees all the strings in `FreeOptions()`. - PR: https://git.openjdk.org/jdk/pull/11384

Re: RFR: JDK-8297688: libjli leaks memory related to options handling

2022-11-27 Thread David Holmes
On Mon, 28 Nov 2022 03:23:01 GMT, Justin King wrote: > Fix memory leaks by making `AddOption` unconditionally duplicate passed in > strings, taking ownership. Callers using dynamic memory free their storage > after calling `AddOption`. This ensures no memory is dropped on the floor. > This

RFR: JDK-8297688: libjli leaks memory related to options handling

2022-11-27 Thread Justin King
Fix memory leaks by making `AddOption` unconditionally duplicate passed in strings, taking ownership. Callers using dynamic memory free their storage after calling `AddOption`. This ensures no memory is dropped on the floor. This also removes the second argument to `AddOption` as it is unused

Re: RFR: 8297561: Redundant index check in String.offsetByCodePoints()

2022-11-27 Thread Andrey Turbanov
On Thu, 24 Nov 2022 10:08:31 GMT, Sergey Tsypanov wrote: > `String.offsetByCodePoints()` delegates to `Character.offsetByCodePoints()` > which in turn specifies the same exception thrown under the same conditions > and the implementation does exactly the same checks. This means we can remove

Re: RFR: 8294321: Fix typos in files under test/jdk/java, test/jdk/jdk, test/jdk/jni [v2]

2022-11-27 Thread Michael Ernst
On Mon, 26 Sep 2022 16:51:36 GMT, Michael Ernst wrote: >> 8294321: Fix typos in files under test/jdk/java, test/jdk/jdk, test/jdk/jni > > Michael Ernst has updated the pull request with a new target base due to a > merge or a rebase. The pull request now contains six commits: > > - Reinstate

Re: RFR: JDK-8297299 SequenceInputStream should not use Vector [v2]

2022-11-27 Thread Markus KARG
On Mon, 21 Nov 2022 18:22:26 GMT, Jens Lidestrom wrote: >> I think the public visibility of my Twitter account is not wide enough to >> get *really robust* answers, unfortunately. So far, 92% answered that they >> not even used SIS in their whole life. So the users of two-args constructor >>

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v14]

2022-11-27 Thread Alan Bateman
On Thu, 24 Nov 2022 16:21:42 GMT, Per Minborg wrote: >> This PR proposes the introduction of **guarding** of the use of >> `DirectBuffer::address` within the JDK. With the introduction of the Foreign >> Function and Memory access, it is possible to derive Buffer instances that >> are backed

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v14]

2022-11-27 Thread Alan Bateman
On Thu, 24 Nov 2022 16:21:42 GMT, Per Minborg wrote: >> This PR proposes the introduction of **guarding** of the use of >> `DirectBuffer::address` within the JDK. With the introduction of the Foreign >> Function and Memory access, it is possible to derive Buffer instances that >> are backed