qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Huston" <shus...@riverace.com>
Subject RE: patch: Don't access after delete in RdmaServer.cpp
Date Wed, 06 Oct 2010 12:39:50 GMT
Hi Aaron,

Thanks very much for the eyes on the code. Could you please enter this
problem as a jira (https://issues.apache.org/jira/browse/qpid) and
attach your patch to the jira? Please be sure to check the box "Grant
license to ASF for inclusion in ASF works" to ensure yor patch can be
used.

-Steve

> -----Original Message-----
> From: Aaron Fabbri [mailto:ajfabbri@gmail.com] 
> Sent: Tuesday, October 05, 2010 10:15 PM
> To: dev@qpid.apache.org
> Subject: Re: patch: Don't access after delete in RdmaServer.cpp
> 
> 
> Actually, use this patch.. it fixes an additional use-after-free.
> 
> 
> Index: RdmaServer.cpp 
> ===================================================================
> --- RdmaServer.cpp      (revision 1004875)
> +++ RdmaServer.cpp      (working copy)
> @@ -118,18 +118,18 @@
>      ConRec* cr = ci->getContext<ConRec>();
>      cr->connection->disconnect();
>      cr->data->drainWriteQueue(drained);
> +    cout << "Disconnected: " << cr << "\n";
>      delete cr;
> -    cout << "Disconnected: " << cr << "\n";
>  }
> 
>  void connectionError(Rdma::Connection::intrusive_ptr& ci, 
> Rdma::ErrorType) {
>      ConRec* cr = ci->getContext<ConRec>();
> -    cr->connection->disconnect();
>      if (cr) {
> -        cr->data->drainWriteQueue(drained);
> -        delete cr;
> +       cr->connection->disconnect();
> +       cr->data->drainWriteQueue(drained);
> +       cout << "Connection error: " << cr << "\n";
> +       delete cr;
>      }
> -    cout << "Connection error: " << cr << "\n";
>  }
> 
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:dev-subscribe@qpid.apache.org
> 
> 


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Mime
View raw message