Repository: trafficserver Updated Branches: refs/heads/master ee446f9c4 -> f71d06853
TS-3710: ASAN crash in TLS with 6.0.0 Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/f71d0685 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/f71d0685 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/f71d0685 Branch: refs/heads/master Commit: f71d0685333d7853a7ca5ea98fc43b18de1f5488 Parents: ee446f9 Author: shinrich <shinr...@yahoo-inc.com> Authored: Fri Jul 3 06:40:58 2015 -0500 Committer: shinrich <shinr...@yahoo-inc.com> Committed: Fri Jul 3 06:40:58 2015 -0500 ---------------------------------------------------------------------- iocore/net/SSLNextProtocolAccept.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f71d0685/iocore/net/SSLNextProtocolAccept.cc ---------------------------------------------------------------------- diff --git a/iocore/net/SSLNextProtocolAccept.cc b/iocore/net/SSLNextProtocolAccept.cc index c4748c3..7e85e9c 100644 --- a/iocore/net/SSLNextProtocolAccept.cc +++ b/iocore/net/SSLNextProtocolAccept.cc @@ -85,7 +85,7 @@ struct SSLNextProtocolTrampoline : public Continuation { case VC_EVENT_ERROR: case VC_EVENT_ACTIVE_TIMEOUT: case VC_EVENT_INACTIVITY_TIMEOUT: - netvc->do_io(VIO::CLOSE); + netvc->do_io_close(); delete this; return EVENT_ERROR; case VC_EVENT_READ_COMPLETE: @@ -96,13 +96,15 @@ struct SSLNextProtocolTrampoline : public Continuation { plugin = netvc->endpoint(); if (plugin) { + netvc->do_io_read(NULL, 0, NULL); // Disable the read IO that we started. send_plugin_event(plugin, NET_EVENT_ACCEPT, netvc); } else if (npnParent->endpoint) { // Route to the default endpoint + netvc->do_io_read(NULL, 0, NULL); // Disable the read IO that we started. send_plugin_event(npnParent->endpoint, NET_EVENT_ACCEPT, netvc); } else { // No handler, what should we do? Best to just kill the VC while we can. - netvc->do_io(VIO::CLOSE); + netvc->do_io_close(); } delete this; @@ -130,11 +132,11 @@ SSLNextProtocolAccept::mainEvent(int event, void *edata) // the endpoint that there is an accept to handle until the read completes // and we know which protocol was negotiated. netvc->registerNextProtocolSet(&this->protoset); - netvc->do_io(VIO::READ, new SSLNextProtocolTrampoline(this, netvc->mutex), 0, this->buffer, 0); + netvc->do_io_read(new SSLNextProtocolTrampoline(this, netvc->mutex), 0, this->buffer); netvc->set_session_accept_pointer(this); return EVENT_CONT; default: - netvc->do_io(VIO::CLOSE); + netvc->do_io_close(); return EVENT_DONE; } }