[ 
https://issues.apache.org/jira/browse/QPID-5663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13976663#comment-13976663
 ] 

Gordon Sim commented on QPID-5663:
----------------------------------

Sorry, my approval above was too hasty! This change appears to break the 
interlink tests on linux. I didn't read the change properly and missed an 
important - and I believe incorrect -  change to the use of 'new' for the 
Variant::Map passed in. That returns a pointer to the map, which is then going 
through some non-obvious conversion chain in the initialisation of the 
DataBuilder constructors only arg. I suggest the following change:

{noformat}
Index: src/qpid/messaging/amqp/EncodedMessage.cpp
===================================================================
--- src/qpid/messaging/amqp/EncodedMessage.cpp  (revision 1588966)
+++ src/qpid/messaging/amqp/EncodedMessage.cpp  (working copy)
@@ -229,7 +229,8 @@
                 c = builder.getList();
                 raw.assign(body.data, body.size);
             } else if (bodyType == qpid::amqp::typecodes::MAP_NAME) {
-                qpid::amqp::DataBuilder builder(new 
qpid::types::Variant::Map());
+                qpid::types::Variant v = qpid::types::Variant::Map();
+                qpid::amqp::DataBuilder builder(v);
                 qpid::amqp::Decoder decoder(body.data, body.size);
                 decoder.read(builder);
                 c = builder.getValue().asMap();
{noformat}

> [C++ Messaging] Windows AMQP 1.0 map_receiver fails freeing uninitialized 
> string Variant
> ----------------------------------------------------------------------------------------
>
>                 Key: QPID-5663
>                 URL: https://issues.apache.org/jira/browse/QPID-5663
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Client
>    Affects Versions: 0.29
>         Environment: Windows x86 build on x64 host. Visual Studio 2010
>            Reporter: Chuck Rolke
>         Attachments: qpid-5663-stack-00.txt
>
>
> Running map_receiver with AMQP 1.0  fails straight away with a free of as 
> string at 0xfeeefeee.
> {noformat}
> map_sender   localhost:5672 "message_queue; {create: always}" 
> "{protocol:amqp1.0}"
> map_receiver localhost:5672 "message_queue; {create: always}" 
> "{protocol:amqp1.0}"
> {noformat}
> These work indefinitely running amqp0-10. map_sender is fine running either 
> protocol version.
> Stack trace is posted as separate file.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to