Fix for small leak in TimeZone_md.c
Thomas Stüfe
thomas.stuefe at gmail.com
Wed Aug 19 17:39:57 UTC 2015
Hi Christoph,
ok, I closed my bug report as a duplicate of the one Axel opened. Also, I
marked Axels bug report as Solaris only.
As for the second webrev: I don't really like that we now mix in AIX-only
code cleanup into a fix for a solaris-only bug. I think this should go into
a separate issue.
Apart from that: Sorry, I am not a big fan of the changes: they introduce a
new unnecessary copy operation (before, we returned the return value
of mapPlatformToJavaTimezone() directly, now we strdup it once more before
returning) and introduces a new exit point (line 711) where before was only
one exit point at the end of the function. I admit the code before was not
nice nor readable but the new code is not much clearer. Just my opinion
though, lets hear some others.
Regards, Thomas
On Wed, Aug 19, 2015 at 3:14 PM, Langer, Christoph <christoph.langer at sap.com
> wrote:
> Hi Thomas,
>
>
>
> thanks for your review.
>
>
>
> Axel already helped me to create a bug report:
> https://bugs.openjdk.java.net/browse/JDK-8133830
>
>
>
> I had also updated my webrev, as I would like to take the chance to do
> some minor refactoring of the AIX porting code for better readability:
> http://cr.openjdk.java.net/~asiebenborn/8133830/webrev/
>
>
>
> Can you review the updated change as well?
>
>
>
> Thanks
>
> Christoph
>
>
>
> *From:* Thomas Stüfe [mailto:thomas.stuefe at gmail.com]
> *Sent:* Mittwoch, 19. August 2015 13:12
> *To:* Langer, Christoph
> *Cc:* jdk9-dev at openjdk.java.net
> *Subject:* Re: Fix for small leak in TimeZone_md.c
>
>
>
> Hi Christoph,
>
>
>
> looks fine. I opened a bug for you:
> https://bugs.openjdk.java.net/browse/JDK-8133933
>
>
>
> But this needs another reviewer and a sponsor.
>
>
>
> Kind Regards, Thomas
>
>
>
>
>
>
>
> On Tue, Aug 18, 2015 at 11:52 AM, Langer, Christoph <
> christoph.langer at sap.com> wrote:
>
> Hi all,
>
> I think there is a small memory leak in TimeZone_md.c in the case of
> solaris "localtime".
>
> When getPlatformTimeZoneID() is called and its result is "localtime", the
> returned string buffer is not freed as the pointer "freetz" is overwritten
> after the call to getSolarisDefaultZoneID().
>
> Please have a look at my webrev:
> http://cr.openjdk.java.net/~asiebenborn/christoph/webrev/ for a potential
> fix.
>
> A bug was not yet created but should be done after you agree that this is
> an issue.
>
> Thanks in advance for comments.
>
> Best regards
> Christoph
>
>
>
More information about the jdk9-dev
mailing list