summaryrefslogtreecommitdiff
path: root/include/sessions.hpp
diff options
context:
space:
mode:
authorWludzik, Jozef <jozef.wludzik@intel.com>2020-10-19 13:59:41 +0300
committerJozef Wludzik <jozef.wludzik@intel.com>2020-10-22 09:23:24 +0300
commitc7d3422c108c6a88bbeffcea3edbb3f59e3992e3 (patch)
treebd6bf11ba93dec9114ac962ebab35416fa430fb3 /include/sessions.hpp
parent3fad0d59b94d951a752530d01db5451773f7d374 (diff)
downloadbmcweb-c7d3422c108c6a88bbeffcea3edbb3f59e3992e3.tar.xz
Avoid using deleted Connection in Response
Connection is destroyed when completeRequestHandler is nulled. It causes that memory is freed. When Response::end() is called and connection is not alive, completeRequest() method removes last shared_ptr reference by setting nullptr on completeRequestHandler member of Response. In this moment code is executed on destroyed object and can cause stack overflow. Fixed it by moving a call to completeRequest method to Asio executor in completeRequestHandler. Tested: - Ran stress test that send a lot of GET and POST requests without a bmcweb service crash Change-Id: Idcf6a06dac32e9eac08285b9b53a5e8afe36c955 Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
Diffstat (limited to 'include/sessions.hpp')
0 files changed, 0 insertions, 0 deletions