Request for review (#4) 7174978: NPG: Fix bactrace builder for class redefinition
Vitaly Davidovich
vitalyd at gmail.com
Fri Jan 18 06:26:01 PST 2013
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.
Sent from my phone
On Jan 18, 2013 12:49 AM, "serguei.spitsyn at oracle.com" <
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/~coleenp/8006548/>
>> bug link at http://bugs.sun.com/view_bug.**do?bug_id=8006548<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/d0f2d6b3/attachment-0001.html
More information about the hotspot-runtime-dev
mailing list