You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by wujianjin <wu...@gmail.com> on 2014/03/06 12:08:16 UTC
activemq-cpp-3.7.0 crash
hello eveyone look this post.
when i use the activemq-cpp-3.7.0, i got a crash on my program.the crash
point to activemq.dll
////////////////////////////////////////////////////////////////////////////////
void BooleanStream::unmarshal( DataInputStream* dataIn ) {
try{
arrayLimit = (short)( dataIn->readByte() & 0xFF );
if ( arrayLimit == 0xC0 ) {
arrayLimit = (short)( dataIn->readByte() & 0xFF );
} else if( arrayLimit == 0x80 ) {
arrayLimit = dataIn->readShort();
}
// Make sure we can accomodate all the data.
data.resize( arrayLimit );
// Make sure we get all the data we are expecting
dataIn->readFully( &data[0], (int)data.size(), 0, arrayLimit );
clear();
}
AMQ_CATCH_RETHROW( IOException )
AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
AMQ_CATCHALL_THROW( IOException )
}
/////////////////////////////////////////////////////////////////////
the line
dataIn->readFully( &data[0], (int)data.size(), 0, arrayLimit );
crash when the arraryLimit is 0.
this function throw a c-run-time exception and none of the exception routine
handle this exception.
--
View this message in context: http://activemq.2283324.n4.nabble.com/activemq-cpp-3-7-0-crash-tp4678584.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: activemq-cpp-3.7.0 crash
Posted by Timothy Bish <ta...@gmail.com>.
On 03/13/2014 02:00 AM, wujianjin wrote:
> thank you for you relay very much. I check the code in 3.8.2. BooleanStream
> class source code didn't have any change. Does the caller of the
> BooleanStream deal with the siutuation of the vector of data will not be
> empty?
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/activemq-cpp-3-7-0-crash-tp4678584p4678944.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
If you think there's an issue please open a new Jira request and include
the investigation results, we can try to patch it for a 3.8.3 release
--
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.fusesource.com | www.redhat.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/
Re: activemq-cpp-3.7.0 crash
Posted by artnaseef <ar...@artnaseef.com>.
The code in question is part of unmarshalling - which means data coming in
must be properly interpreted. It's possible the incoming stream is
misinterpreted with the older library and that's corrected.
--
View this message in context: http://activemq.2283324.n4.nabble.com/activemq-cpp-3-7-0-crash-tp4678584p4678964.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: activemq-cpp-3.7.0 crash
Posted by wujianjin <wu...@gmail.com>.
thank you for you relay very much. I check the code in 3.8.2. BooleanStream
class source code didn't have any change. Does the caller of the
BooleanStream deal with the siutuation of the vector of data will not be
empty?
--
View this message in context: http://activemq.2283324.n4.nabble.com/activemq-cpp-3-7-0-crash-tp4678584p4678944.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: activemq-cpp-3.7.0 crash
Posted by Timothy Bish <ta...@gmail.com>.
On 03/06/2014 06:08 AM, wujianjin wrote:
> hello eveyone look this post.
> when i use the activemq-cpp-3.7.0, i got a crash on my program.the crash
> point to activemq.dll
>
> ////////////////////////////////////////////////////////////////////////////////
> void BooleanStream::unmarshal( DataInputStream* dataIn ) {
>
> try{
>
> arrayLimit = (short)( dataIn->readByte() & 0xFF );
>
> if ( arrayLimit == 0xC0 ) {
> arrayLimit = (short)( dataIn->readByte() & 0xFF );
> } else if( arrayLimit == 0x80 ) {
> arrayLimit = dataIn->readShort();
> }
>
> // Make sure we can accomodate all the data.
> data.resize( arrayLimit );
>
> // Make sure we get all the data we are expecting
> dataIn->readFully( &data[0], (int)data.size(), 0, arrayLimit );
>
> clear();
> }
> AMQ_CATCH_RETHROW( IOException )
> AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
> AMQ_CATCHALL_THROW( IOException )
> }
> /////////////////////////////////////////////////////////////////////
>
>
> the line
> dataIn->readFully( &data[0], (int)data.size(), 0, arrayLimit );
>
> crash when the arraryLimit is 0.
>
> this function throw a c-run-time exception and none of the exception routine
> handle this exception.
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/activemq-cpp-3-7-0-crash-tp4678584.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Latest release is v3.8.2, you should upgrade to this version.
--
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.fusesource.com | www.redhat.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/