You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Kevin Ballard (JIRA)" <ji...@apache.org> on 2010/01/23 00:30:21 UTC

[jira] Created: (THRIFT-688) cocoa: Memory management rules violated by -newProtocolOnTransport:

cocoa: Memory management rules violated by -newProtocolOnTransport:
-------------------------------------------------------------------

                 Key: THRIFT-688
                 URL: https://issues.apache.org/jira/browse/THRIFT-688
             Project: Thrift
          Issue Type: Bug
          Components: Library (Cocoa)
    Affects Versions: 0.2
            Reporter: Kevin Ballard


The standard Cocoa memory management rules are not followed in the implementation/usage of -newProtocolOnTransport:. According to the memory management rules, methods starting with "new" return an owned object, but the current implementation of -[TBinaryProtocol newProtocolOnTransport:] (and its subsequent usage in TSocketServer) returns an autoreleased object instead. The attached patch fixes this, and can be verified by running the Clang Static Analyzer on the code both before and after the patch.

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


[jira] Commented: (THRIFT-688) cocoa: Memory management rules violated by -newProtocolOnTransport:

Posted by "Kevin Ballard (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12889455#action_12889455 ] 

Kevin Ballard commented on THRIFT-688:
--------------------------------------

This issue is still outstanding on trunk. Any possibility of getting this applied?

> cocoa: Memory management rules violated by -newProtocolOnTransport:
> -------------------------------------------------------------------
>
>                 Key: THRIFT-688
>                 URL: https://issues.apache.org/jira/browse/THRIFT-688
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (Cocoa)
>    Affects Versions: 0.2
>            Reporter: Kevin Ballard
>         Attachments: TBinaryProtocol.patch
>
>
> The standard Cocoa memory management rules are not followed in the implementation/usage of -newProtocolOnTransport:. According to the memory management rules, methods starting with "new" return an owned object, but the current implementation of -[TBinaryProtocol newProtocolOnTransport:] (and its subsequent usage in TSocketServer) returns an autoreleased object instead. The attached patch fixes this, and can be verified by running the Clang Static Analyzer on the code both before and after the patch.

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


[jira] Updated: (THRIFT-688) cocoa: Memory management rules violated by -newProtocolOnTransport:

Posted by "Kevin Ballard (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-688?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Ballard updated THRIFT-688:
---------------------------------

    Attachment: TBinaryProtocol.patch

> cocoa: Memory management rules violated by -newProtocolOnTransport:
> -------------------------------------------------------------------
>
>                 Key: THRIFT-688
>                 URL: https://issues.apache.org/jira/browse/THRIFT-688
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (Cocoa)
>    Affects Versions: 0.2
>            Reporter: Kevin Ballard
>         Attachments: TBinaryProtocol.patch
>
>
> The standard Cocoa memory management rules are not followed in the implementation/usage of -newProtocolOnTransport:. According to the memory management rules, methods starting with "new" return an owned object, but the current implementation of -[TBinaryProtocol newProtocolOnTransport:] (and its subsequent usage in TSocketServer) returns an autoreleased object instead. The attached patch fixes this, and can be verified by running the Clang Static Analyzer on the code both before and after the patch.

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


[jira] Assigned: (THRIFT-688) cocoa: Memory management rules violated by -newProtocolOnTransport:

Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-688?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Duxbury reassigned THRIFT-688:
------------------------------------

    Assignee: Kevin Ballard

> cocoa: Memory management rules violated by -newProtocolOnTransport:
> -------------------------------------------------------------------
>
>                 Key: THRIFT-688
>                 URL: https://issues.apache.org/jira/browse/THRIFT-688
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (Cocoa)
>    Affects Versions: 0.2
>            Reporter: Kevin Ballard
>            Assignee: Kevin Ballard
>         Attachments: TBinaryProtocol.patch
>
>
> The standard Cocoa memory management rules are not followed in the implementation/usage of -newProtocolOnTransport:. According to the memory management rules, methods starting with "new" return an owned object, but the current implementation of -[TBinaryProtocol newProtocolOnTransport:] (and its subsequent usage in TSocketServer) returns an autoreleased object instead. The attached patch fixes this, and can be verified by running the Clang Static Analyzer on the code both before and after the patch.

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


[jira] Resolved: (THRIFT-688) cocoa: Memory management rules violated by -newProtocolOnTransport:

Posted by "Andrew McGeachie (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-688?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew McGeachie resolved THRIFT-688.
-------------------------------------

    Resolution: Fixed

Patch applied.

> cocoa: Memory management rules violated by -newProtocolOnTransport:
> -------------------------------------------------------------------
>
>                 Key: THRIFT-688
>                 URL: https://issues.apache.org/jira/browse/THRIFT-688
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (Cocoa)
>    Affects Versions: 0.2
>            Reporter: Kevin Ballard
>         Attachments: TBinaryProtocol.patch
>
>
> The standard Cocoa memory management rules are not followed in the implementation/usage of -newProtocolOnTransport:. According to the memory management rules, methods starting with "new" return an owned object, but the current implementation of -[TBinaryProtocol newProtocolOnTransport:] (and its subsequent usage in TSocketServer) returns an autoreleased object instead. The attached patch fixes this, and can be verified by running the Clang Static Analyzer on the code both before and after the patch.

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