sudheerv commented on pull request #6800:
URL: https://github.com/apache/trafficserver/pull/6800#issuecomment-630543592


   > In the state dump, in frame #4, it seems to be showing the parameters in 
the reverse order from what they are declared in the function:
   > 
   > 
https://github.com/apache/trafficserver/blob/bf097d4289a3eaa3759a58fb19e48381b89ce32f/src/tscpp/api/utils_internal.cc#L113
   > 
   > 
   > The event parameter is not TS_EVENT_HTTP_TXN_CLOSE (60012).
   > When the TXN_CLOSE hook is triggered, the CPPAPI destroys the instance of 
your custom class that is derived from TransactionPlugin. So you are supposed 
to put anything you want to run on that hook in the destructor of that class. 
Because continuations on hooks run in arbitrary order, I think your change 
could cause a use after free.
   
   The problem is that cppapi does not have the handle for my custom class in 
the TransactionPlugin table, because my plugin never called addPlugin() on it. 
So, cppapi does/can not destroy my plugin object. 
   
   Does that answer your question or did I misunderstand your point?


----------------------------------------------------------------
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:
[email protected]


Reply via email to