Ken Giusti created PROTON-489:
---------------------------------
Summary: [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
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.1.5#6160)