You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2011/10/23 00:58:54 UTC
svn commit: r1187824 - in /trafficserver/traffic/trunk: CHANGES
iocore/net/UnixUDPNet.cc
Author: zwoop
Date: Sat Oct 22 22:58:54 2011
New Revision: 1187824
URL: http://svn.apache.org/viewvc?rev=1187824&view=rev
Log:
TS-997 ATS crashes on remap plugin initialization failure
Author: Manjesh Nilange
Review: leif
Modified:
trafficserver/traffic/trunk/CHANGES
trafficserver/traffic/trunk/iocore/net/UnixUDPNet.cc
Modified: trafficserver/traffic/trunk/CHANGES
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/CHANGES?rev=1187824&r1=1187823&r2=1187824&view=diff
==============================================================================
--- trafficserver/traffic/trunk/CHANGES (original)
+++ trafficserver/traffic/trunk/CHANGES Sat Oct 22 22:58:54 2011
@@ -1,5 +1,8 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 3.1.1
+ *) TS-997 ATS crashes on remap plugin initialization failure.
+ Author: Manjesh Nilange.
+
*) [TS-988] Updated ICP for IPv6.
*) [TS-994] Removed the extra splace from X-Forwarded-For.
Modified: trafficserver/traffic/trunk/iocore/net/UnixUDPNet.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/net/UnixUDPNet.cc?rev=1187824&r1=1187823&r2=1187824&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/net/UnixUDPNet.cc (original)
+++ trafficserver/traffic/trunk/iocore/net/UnixUDPNet.cc Sat Oct 22 22:58:54 2011
@@ -230,6 +230,8 @@ private:
ClassAllocator<UDPReadContinuation> udpReadContAllocator("udpReadContAllocator");
+#define UNINITIALIZED_EVENT_PTR (Event *)0xdeadbeef
+
UDPReadContinuation::UDPReadContinuation(Event * completionToken)
: Continuation(NULL), event(completionToken), readbuf(NULL),
readlen(0), fromaddrlen(0), fd(-1), ifd(-1), period(0), elapsed_time(0), timeout_interval(0)
@@ -241,7 +243,7 @@ UDPReadContinuation::UDPReadContinuation
}
UDPReadContinuation::UDPReadContinuation()
-: Continuation(NULL), event(0), readbuf(NULL),
+: Continuation(NULL), event(UNINITIALIZED_EVENT_PTR), readbuf(NULL),
readlen(0), fromaddrlen(0), fd(-1), ifd(-1), period(0), elapsed_time(0), timeout_interval(0)
{
}
@@ -292,9 +294,12 @@ UDPReadContinuation::init_read(int rfd,
UDPReadContinuation::~UDPReadContinuation()
{
- ink_assert(event != NULL);
- completionUtil::destroy(event);
- event = NULL;
+ if (event != UNINITIALIZED_EVENT_PTR)
+ {
+ ink_assert(event != NULL);
+ completionUtil::destroy(event);
+ event = NULL;
+ }
}
void