<AWT Dev> RFR 8213532: add missing LocalFree calls after using FormatMessage(A) [windows] - was RE: FW: RFR [XS] : 8213366: (fs) avoid handle leak in Java_sun_nio_fs_WindowsNativeDispatcher_FindFirstFile0
Baesken, Matthias
matthias.baesken at sap.com
Thu Nov 8 16:20:50 UTC 2018
Hello, looks like I used the wrong DTRACE_PRINTLN* call at one place in src/java.desktop/windows/native/libawt/windows/ThemeReader.cpp .
New webrev :
http://cr.openjdk.java.net/~mbaesken/webrevs/8213532.1/
Regards, Matthias
> -----Original Message-----
> From: Baesken, Matthias
> Sent: Donnerstag, 8. November 2018 13:25
> To: 'Sergey Bylokhov' <Sergey.Bylokhov at oracle.com>; awt-
> dev at openjdk.java.net
> Subject: RFR 8213532: add missing LocalFree calls after using
> FormatMessage(A) [windows] - was RE: <AWT Dev> FW: RFR [XS] : 8213366:
> (fs) avoid handle leak in
> Java_sun_nio_fs_WindowsNativeDispatcher_FindFirstFile0
>
> Hi Sergey, thanks for commenting.
> I opened the following bug for it :
>
> https://bugs.openjdk.java.net/browse/JDK-8213532
>
> webrev :
>
> http://cr.openjdk.java.net/~mbaesken/webrevs/8213532.0/
>
> Best regards, Matthias
>
>
> > -----Original Message-----
> > From: Sergey Bylokhov <Sergey.Bylokhov at oracle.com>
> > Sent: Mittwoch, 7. November 2018 23:15
> > To: Baesken, Matthias <matthias.baesken at sap.com>; awt-
> > dev at openjdk.java.net
> > Cc: Alan Bateman (Alan.Bateman at oracle.com)
> <Alan.Bateman at oracle.com>
> > Subject: Re: <AWT Dev> FW: RFR [XS] : 8213366: (fs) avoid handle leak in
> > Java_sun_nio_fs_WindowsNativeDispatcher_FindFirstFile0
> >
> > Hi, Matthias.
> >
> > The contributions for such issues are welcome.
> >
> > On 07/11/2018 01:16, Baesken, Matthias wrote:
> > > Okay, forwarding to awt-dev ...
> > >
>
> ..........
>
> > >>
> > >> Btw. while looking for other small leaks (unrelated to nio )
> > >>
> > >>
> > >> I noticed a few "shaky" places in the Windows-coding when it comes
> to
> > >>
> > >> FormatMessage( ... FORMAT_MESSAGE_ALLOCATE_BUFFER, ... ) +
> > (missing) follow-up LocalFree .
> > >>
> > >> Examples :
> > >>
> > >>
> >
> https://hg.openjdk.java.net/jdk/jdk/file/a0ea20bc7af0/src/jdk.accessibility/
> > windows/native/common/AccessBridgeDebug.cpp#l51
> > >>
> > >> (debug-only code) :
> > >>
> > >>
> >
> https://hg.openjdk.java.net/jdk/jdk/file/a0ea20bc7af0/src/java.desktop/wi
> > ndows/native/libawt/windows/ThemeReader.cpp#l254
> > >>
> > >> Should those be fixed in another CR (or is it considered not so
> important
> > (just Windows, and maybe also only debug-related code ?)
> > >>
> > > It would be better to discuss those on awt-dev as any changes in those
> > > areas will need a separate JBS issue.
> > >
> > > -Alan
> > >
More information about the awt-dev
mailing list