qpid-proton mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ken Giusti (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (PROTON-489) [proton-c] Segfault when freeing endpoints out-of-order.
Date Thu, 06 Mar 2014 13:24:44 GMT

     [ 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)

Mime
View raw message