You are viewing a plain text version of this content. The canonical link for it is here.
Posted to proton@qpid.apache.org by "Ken Giusti (JIRA)" <ji...@apache.org> on 2014/03/06 14:24:44 UTC

[jira] [Resolved] (PROTON-489) [proton-c] Segfault when freeing endpoints out-of-order.

     [ https://issues.apache.org/jira/browse/PROTON-489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ken Giusti resolved PROTON-489.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 0.7

> [proton-c] Segfault when freeing endpoints out-of-order.
> --------------------------------------------------------
>
>                 Key: PROTON-489
>                 URL: https://issues.apache.org/jira/browse/PROTON-489
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-c
>    Affects Versions: 0.6
>            Reporter: Ken Giusti
>            Assignee: Ken Giusti
>             Fix For: 0.7
>
>
> If a connection or session is freed before all of its "children" objects (sessions, links) are freed, a segFault is hit.
> Example code that triggers this:
> #include "proton/engine.h"
> int main(int argc, char** argv)
> {
>     pn_connection_t *conn = pn_connection();
>     pn_session_t *ssn = pn_session(conn);
>     pn_link_t *tx = pn_sender(ssn, "tx");
>     pn_link_t *rx = pn_sender(ssn, "tx");
>     pn_connection_free(conn);
>     pn_session_free(ssn);
>     pn_link_free(tx);
>     pn_link_free(rx);
>     return 0;
> }
> While releasing endpoints in this order may not be considered correct, we should prevent segfaulting when the program accesses a "orphaned" endpoint.



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