[ 
https://issues.apache.org/jira/browse/DISPATCH-1614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17110285#comment-17110285
 ] 

ASF GitHub Bot commented on DISPATCH-1614:
------------------------------------------

ted-ross commented on a change in pull request #738:
URL: https://github.com/apache/qpid-dispatch/pull/738#discussion_r426624937



##########
File path: src/router_core/modules/edge_router/addr_proxy.c
##########
@@ -215,6 +215,50 @@ static void del_outlink(qcm_edge_addr_proxy_t *ap, 
qdr_address_t *addr)
     }
 }
 
+static void on_link_event(void *context, qdrc_event_t event, qdr_link_t *link)
+{
+    if (!link || !link->conn)
+        return;
+
+    //
+    // We only care if the link event is on an edge connection.
+    //
+    if (link->conn->role != QDR_ROLE_EDGE_CONNECTION)
+            return;
+
+    switch (event) {
+        case QDRC_EVENT_LINK_OUT_DETACHED: {
+            qdr_address_t *addr = link->owning_addr;
+            if (addr && addr->edge_outlink && link == addr->edge_outlink) {

Review comment:
       The second condition in the if is technically not necessary.  
edge_outlink is never dereferenced, only compared.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Edge router crash when interior closes edge uplink connection
> -------------------------------------------------------------
>
>                 Key: DISPATCH-1614
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-1614
>             Project: Qpid Dispatch
>          Issue Type: Bug
>          Components: Container
>    Affects Versions: 1.11.0
>            Reporter: Charles E. Rolke
>            Assignee: Charles E. Rolke
>            Priority: Major
>             Fix For: 1.12.0
>
>         Attachments: DISPATCH-1614-edge-router-log.txt
>
>
> When the connection to the interior router goes down then the 
> addr.edge_outlink link proper is freed but the pointer to the link is still 
> in the addr struct.
> Later when the addr is unbound the link is dereferenced causing a segfault.
> An attached log trace shows the events. Search for link _0x1c31210_ using 
> mobile address _M0e61_.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to