moonchen commented on code in PR #10687:
URL: https://github.com/apache/trafficserver/pull/10687#discussion_r1378028790


##########
src/iocore/net/UnixNetAccept.cc:
##########
@@ -571,8 +571,10 @@ NetAccept::acceptLoopEvent(int event, Event *e)
 {
   (void)event;
   (void)e;
-  EThread *t = this_ethread();
-
+  EThread *t    = this_ethread();
+  NetHandler *h = get_NetHandler(t);

Review Comment:
   Since you're on a dedicated accept thread, and NetHandler is only 
initialized on ET_NET threads, the pointer h now points to an uninitialized 
NetHandler object.  (The memory belongs to PER_THREAD_DATA, and is actually 
zeroed in EThread::EThread)
   
   My suggestion would be to store this config in a thread-local block of 
memory, or to have the dedicated accept threads read the config values from the 
global config, if the config is not expected to change often.



-- 
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.

To unsubscribe, e-mail: github-unsubscr...@trafficserver.apache.org

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

Reply via email to