Details
Description
Our application that uses activemq c++ client lib crashed with the following dump:
----------------------------------------------------------------------------------------------------------------------
Thread 87 - System ID 3780
Function Arg 1 Arg 2 Arg 3 Source
libapr_1!apr_pvsprintf+8 00000000 0642a188 180eeb94
activemq_cppu!decaf::lang::Exception::buildMessage+71 0642a188 180eeb74 180eee2c
activemq_cppu!decaf::lang::exceptions::RuntimeException::RuntimeException+4d 180efeec 0642a160 00000097
activemq_cppu!decaf::lang::ThreadProperties::runCallback+125 180eee2c 180efee0 00000001
msvcr80!CatchIt+5c 00000000 00000000 00000000
LIBAPR_1!APR_PVSPRINTF+8In scotapp.dmp the assembly instruction at libapr_1!apr_pvsprintf+8 in C:\scot\dll\libapr-1.dll has caused an access violation exception (0xC0000005) when trying to read from memory location 0x0000002c on thread 87
--------------------------------------------------------------------------------------------------------------------
On the call stack, we saw that following function from class decaf::lang::Exception was called:
void Exception::buildMessage( const char* format, va_list& vargs ) {
// Allocate buffer with a guess of it's size
AprPool pool;
// Allocate a buffer of the specified size.
char* buffer = apr_pvsprintf( pool.getAprPool(), format, vargs );
// Guessed size was enough. Assign the string.
message.assign( buffer, strlen( buffer ) );
}
The first parameter passed into apr_pvsprintf was NULL, causing the crash. Could you please take a look and see if there is any bug in the activemqcpp code that could cause the problem. Thanks!