You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Brian McKinnon (JIRA)" <ji...@apache.org> on 2010/11/02 19:49:00 UTC

[jira] Created: (AMQCPP-326) Returning std::string across a dll boundary in getTopicName causes crash

Returning std::string across a dll boundary in getTopicName causes crash
------------------------------------------------------------------------

                 Key: AMQCPP-326
                 URL: https://issues.apache.org/activemq/browse/AMQCPP-326
             Project: ActiveMQ C++ Client
          Issue Type: Improvement
          Components: CMS Impl
    Affects Versions: 3.2.3
         Environment: Visual studio 2010/2008 working with the C4 game engine
            Reporter: Brian McKinnon
            Assignee: Timothy Bish
            Priority: Minor


The C4 game engine has recently implemented there own memory management module overloading the new and delete operations.  As a result the std::string returned by cms::Topic::getTopicName causes the system to crash.   The custom memory manager renders the simple solution of including the same msvc runtime dll unusable. A solution would be to implement a void cms::Topic::getTopicName(std::string & name) function instead or in addition to the existing function.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (AMQCPP-326) Returning std::string across a dll boundary in getTopicName causes crash

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQCPP-326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish closed AMQCPP-326.
-------------------------------

    Resolution: Won't Fix

Closing until a complete patch is contributed.

> Returning std::string across a dll boundary in getTopicName causes crash
> ------------------------------------------------------------------------
>
>                 Key: AMQCPP-326
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-326
>             Project: ActiveMQ C++ Client
>          Issue Type: Improvement
>          Components: CMS Impl
>    Affects Versions: 3.2.3
>         Environment: Visual studio 2010/2008 working with the C4 game engine
>            Reporter: Brian McKinnon
>            Assignee: Timothy Bish
>            Priority: Minor
>         Attachments: getTopicNameIntoReference.patch
>
>
> The C4 game engine has recently implemented there own memory management module overloading the new and delete operations.  As a result the std::string returned by cms::Topic::getTopicName causes the system to crash.   The custom memory manager renders the simple solution of including the same msvc runtime dll unusable. A solution would be to implement a void cms::Topic::getTopicName(std::string & name) function instead or in addition to the existing function.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-326) Returning std::string across a dll boundary in getTopicName causes crash

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62970#action_62970 ] 

Timothy Bish commented on AMQCPP-326:
-------------------------------------

It wouldn't sense to make this change without changing every other method that returns an STL type, the library was intended to be used with the same runtime dll so this would be an extremely large change.  Since the problem only exists for windows users who can't or won't match the runtime DLLs its pretty low on the priority list.  I'm going to close this issue for now until someone offers to contribute a patch to address the problem as a whole.  

> Returning std::string across a dll boundary in getTopicName causes crash
> ------------------------------------------------------------------------
>
>                 Key: AMQCPP-326
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-326
>             Project: ActiveMQ C++ Client
>          Issue Type: Improvement
>          Components: CMS Impl
>    Affects Versions: 3.2.3
>         Environment: Visual studio 2010/2008 working with the C4 game engine
>            Reporter: Brian McKinnon
>            Assignee: Timothy Bish
>            Priority: Minor
>         Attachments: getTopicNameIntoReference.patch
>
>
> The C4 game engine has recently implemented there own memory management module overloading the new and delete operations.  As a result the std::string returned by cms::Topic::getTopicName causes the system to crash.   The custom memory manager renders the simple solution of including the same msvc runtime dll unusable. A solution would be to implement a void cms::Topic::getTopicName(std::string & name) function instead or in addition to the existing function.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQCPP-326) Returning std::string across a dll boundary in getTopicName causes crash

Posted by "Brian McKinnon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQCPP-326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian McKinnon updated AMQCPP-326:
----------------------------------

    Attachment: getTopicNameIntoReference.patch

> Returning std::string across a dll boundary in getTopicName causes crash
> ------------------------------------------------------------------------
>
>                 Key: AMQCPP-326
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-326
>             Project: ActiveMQ C++ Client
>          Issue Type: Improvement
>          Components: CMS Impl
>    Affects Versions: 3.2.3
>         Environment: Visual studio 2010/2008 working with the C4 game engine
>            Reporter: Brian McKinnon
>            Assignee: Timothy Bish
>            Priority: Minor
>         Attachments: getTopicNameIntoReference.patch
>
>
> The C4 game engine has recently implemented there own memory management module overloading the new and delete operations.  As a result the std::string returned by cms::Topic::getTopicName causes the system to crash.   The custom memory manager renders the simple solution of including the same msvc runtime dll unusable. A solution would be to implement a void cms::Topic::getTopicName(std::string & name) function instead or in addition to the existing function.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-326) Returning std::string across a dll boundary in getTopicName causes crash

Posted by "Brian McKinnon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62969#action_62969 ] 

Brian McKinnon commented on AMQCPP-326:
---------------------------------------

This issue is actually much larger than I originally thought.  It may be easier for me to stop the C4 memory manager than to make all the changes to activemq-cpp to ensure that the library is safe across memory managers.  You can choose to ignore this request... unless you are interested in me spending more time to try and resolve this issue.

> Returning std::string across a dll boundary in getTopicName causes crash
> ------------------------------------------------------------------------
>
>                 Key: AMQCPP-326
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-326
>             Project: ActiveMQ C++ Client
>          Issue Type: Improvement
>          Components: CMS Impl
>    Affects Versions: 3.2.3
>         Environment: Visual studio 2010/2008 working with the C4 game engine
>            Reporter: Brian McKinnon
>            Assignee: Timothy Bish
>            Priority: Minor
>         Attachments: getTopicNameIntoReference.patch
>
>
> The C4 game engine has recently implemented there own memory management module overloading the new and delete operations.  As a result the std::string returned by cms::Topic::getTopicName causes the system to crash.   The custom memory manager renders the simple solution of including the same msvc runtime dll unusable. A solution would be to implement a void cms::Topic::getTopicName(std::string & name) function instead or in addition to the existing function.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.