activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <tabish...@gmail.com>
Subject Re: AbstractQueuedSynchronizer.cpp bug/typo
Date Mon, 19 Mar 2012 12:46:32 GMT
On Sat, 2012-03-17 at 12:33 -0700, qbeardn wrote: 
> Hi- 
> 
> testing the ActiveMQ CPP trunk in the hope of resolving failover
> difficulties, I spotted something in the source code. 
> 
> In 
>     decaf/util/concurrent/locks/AbstractQueuedSynchronizer.cpp 
> lines 752 and 1056 are both statements 
>     long now = System::nanoTime(); 
> while System::nanoTime() returns a long long. 
> 
> I.e., it tosses the top 32 bits (on my platform).  Subsequently there is a
> subtraction of now from lastTime which really is a long long and so the
> first time those statements are executed (now - lastTime) is a very large
> negative number.
> 

Good catch, you can open a Jira issue if you like to document the issue
and if you have additional test cases to add to the existing unit tests
to catch this sort of thing it'd be great.  You can attach a patch with
your fixes to the issue.

> bob
> 
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/AbstractQueuedSynchronizer-cpp-bug-typo-tp4481122p4481122.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

-- 
Tim Bish
Sr Software Engineer | FuseSource Corp
tim.bish@fusesource.com | www.fusesource.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/


Mime
View raw message