Request for review (#4) 7174978: NPG: Fix bactrace builder for class redefinition
Coleen Phillimore
coleen.phillimore at oracle.com
Fri Jan 18 07:11:37 PST 2013
On 1/18/2013 9:26 AM, Vitaly Davidovich wrote:
>
> Isn't signed overflow undefined in C and C++? Not sure if this code
> should explicitly check if it would overflow (version == max int)
> after increment to be pedantic.
>
Unfortunately, I already checked it in. We do this sort of thing in a
couple of places, so I'll file a bug to fix these also.
Thanks,
Coleen
> Sent from my phone
>
> On Jan 18, 2013 12:49 AM, "serguei.spitsyn at oracle.com
> <mailto:serguei.spitsyn at oracle.com>" <serguei.spitsyn at oracle.com
> <mailto:serguei.spitsyn at oracle.com>> wrote:
>
>
> The fix is good.
>
> Another way would be to use prefix increment instead of postfix
> increment:
> _saved._version = (version >=0) ? ++version : version; // keep
>
> Nice catch, David.
>
> Thanks,
> Serguei
>
>
> On 1/17/13 6:51 PM, Coleen Phillimore wrote:
>
> On 1/17/2013 9:15 PM, David Holmes wrote:
>
> void increment_and_save_version(int version) {
> _saved._version = (version >=0) ? version++ : version;
> // keep
> overflowed value
> }
>
>
> That saves the pre-incremented value. But otherwise it is
> a simpler formulation.
>
> David
>
>
> I fixed it. Please review.
>
> open webrev at http://cr.openjdk.java.net/~coleenp/8006548/
> <http://cr.openjdk.java.net/%7Ecoleenp/8006548/>
> bug link at http://bugs.sun.com/view_bug.do?bug_id=8006548
>
> thanks,
> Coleen
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/attachments/20130118/6c2410d0/attachment.html
More information about the hotspot-runtime-dev
mailing list