RFR(XS): 8153835: Fix range of flag MaxDirectMemorySize which is parsed at jlong.

Lindenmaier, Goetz goetz.lindenmaier at sap.com
Fri Apr 15 06:41:37 UTC 2016


Hi Gerard, 

that's fine, assign it to yourself.
Also, you can consider it reviewed. 

Best regards and thanks for your help,
  Goetz.


> -----Original Message-----
> From: Gerard Ziemski [mailto:gerard.ziemski at oracle.com]
> Sent: Donnerstag, 14. April 2016 21:38
> To: Lindenmaier, Goetz <goetz.lindenmaier at sap.com>
> Cc: hotspot-runtime-dev at openjdk.java.net
> Subject: Re: RFR(XS): 8153835: Fix range of flag MaxDirectMemorySize which
> is parsed at jlong.
> 
> hi Goetz,
> 
> It appears to work as expected on 32bit - the value gets parsed into "java
> long”, so that’s what the max range supplies.
> 
> I will test it out using our internal testing, then ask for final review.
> 
> Do you mind if I assign the issue to myself, so that you can then officially
> review the fix?
> 
> 
> cheers
> 
> > On Apr 14, 2016, at 5:23 AM, Lindenmaier, Goetz
> <goetz.lindenmaier at sap.com> wrote:
> >
> > Oh, sorry, I missed the upper bound you are using. Max_jlong fixes the
> > Java exception.
> >
> > Is it ok on 32-bit if you increase the bound from max_uint32 to max_int64?
> > If so, your fix is fine for me.
> >
> > Best regards,
> >  Goetz.
> >
> >
> >
> >
> >
> >> -----Original Message-----
> >> From: Lindenmaier, Goetz
> >> Sent: Donnerstag, 14. April 2016 12:14
> >> To: 'Gerard Ziemski' <gerard.ziemski at oracle.com>
> >> Cc: hotspot-runtime-dev at openjdk.java.net
> >> Subject: RE: RFR(XS): 8153835: Fix range of flag MaxDirectMemorySize
> which
> >> is parsed at jlong.
> >>
> >> Hi Gerard,
> >>
> >> The code you change is not the problem. The value is passed to Java code,
> >> and java code can't  handle it:
> >>
> >> java.lang.NumberFormatException: For input string:
> >> "18446744073709551615"
> >>        at
> >>
> java.lang.NumberFormatException.forInputString(java.base/NumberFormat
> >> Exception.java:65)
> >>        at java.lang.Long.parseLong(java.base/Long.java:747)
> >>        at java.lang.Long.parseLong(java.base/Long.java:872)
> >>        at
> >> jdk.internal.misc.VM.saveAndRemoveProperties(java.base/VM.java:290)
> >>        at java.lang.System.initPhase1(java.base/System.java:1865)
> >>
> >> We could change the flag to jlong / int64_t with a positive range. But I
> think
> >> size_t is best for a flag giving a memory size.
> >>
> >> Best regards,
> >>  Goetz.
> >>
> >>
> >>
> >>> -----Original Message-----
> >>> From: Gerard Ziemski [mailto:gerard.ziemski at oracle.com]
> >>> Sent: Mittwoch, 13. April 2016 18:30
> >>> To: Lindenmaier, Goetz <goetz.lindenmaier at sap.com>
> >>> Cc: hotspot-runtime-dev at openjdk.java.net
> >>> Subject: Re: RFR(XS): 8153835: Fix range of flag MaxDirectMemorySize
> >> which
> >>> is parsed at jlong.
> >>>
> >>> hi Goetz,
> >>>
> >>> How about if we just change the MaxDirectMemorySize type to
> uint64_t,
> >> like
> >>> so:
> >>>
> >>> http://cr.openjdk.java.net/~gziemski/8153835_rev1/
> >>>
> >>>
> >>> cheers
> >>>
> >>>
> >>>> On Apr 13, 2016, at 8:25 AM, Lindenmaier, Goetz
> >>> <goetz.lindenmaier at sap.com> wrote:
> >>>>
> >>>> Hi,
> >>>>
> >>>> could someone please have a look at this tiny issue? And sponsor?
> >>>>
> >>>> Thanks,
> >>>> Goetz.
> >>>>
> >>>>> -----Original Message-----
> >>>>> From: Lindenmaier, Goetz
> >>>>> Sent: Freitag, 8. April 2016 10:53
> >>>>> To: hotspot-runtime-dev at openjdk.java.net
> >>>>> Subject: RFR(XS): 8153835: Fix range of flag MaxDirectMemorySize
> >> which
> >>> is
> >>>>> parsed at jlong.
> >>>>>
> >>>>> Hi,
> >>>>>
> >>>>>
> >>>>>
> >>>>> The upper limit of the range for flag MaxDirectMemorySize is
> >>> MAX_SIZE_T.
> >>>>>
> >>>>> The flag is used to set a property that is parsed into a long. Thus, the
> >> max
> >>>>>
> >>>>> value on 64-bit platforms is too large.
> >>>>>
> >>>>> Fix: Limit the range to max_jlong, too.
> >>>>>
> >>>>>
> >>>>>
> >>>>> Please review this change. I please need a sponsor.
> >>>>>
> >>>>> http://cr.openjdk.java.net/~goetz/wr16/8153835-
> >> MaxDMSz/webrev.01/
> >>>>>
> >>>>>
> >>>>>
> >>>>> Best regards,
> >>>>>
> >>>>> Goetz.
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >



More information about the hotspot-runtime-dev mailing list