RFR (XS) 8241462: StripNativeDebugSymbols jlink plugin allocates huge arrays

Aleksey Shipilev shade at redhat.com
Tue Mar 24 17:43:44 UTC 2020


On 3/24/20 6:40 PM, Severin Gehwolf wrote:
> On Tue, 2020-03-24 at 12:03 +0100, Aleksey Shipilev wrote:
>> On 3/23/20 9:35 PM, Alan Bateman wrote:
>>> On 23/03/2020 19:22, Aleksey Shipilev wrote:
>>>> +import java.io.InputStream;
>>>>   import java.io.IOException;
>>>>   import java.lang.ProcessBuilder.Redirect;
>>>> @@ -314,5 +315,8 @@
>>>>                   String relativeDbgFileName = relativeFileName + "." + debugExt;
>>>>
>>>> -                Files.write(resourceFileBinary, resource.contentBytes());
>>>> +                try (InputStream in = resource.content()) {
>>>> +                    Files.copy(in, resourceFileBinary);
>>>> +                }
>>>> +
>>>>                   Path resourceFileDebugSymbols;
>>>>                   if (includeDebug) {
>>>>
>>> This looks okay.
>>
>> Thanks Alan.
>>
>> Severin, you're good with this?
> 
> Looks good.

Thanks!

-- 
-Aleksey



More information about the jigsaw-dev mailing list