mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-12-22 19:39:22 +00:00
TCPServer: tweaked ASAN support
This commit is contained in:
parent
86e9af6fd7
commit
a6b6cb0f09
1 changed files with 2 additions and 0 deletions
|
@ -593,6 +593,7 @@ void TCPServer::loop(void* data)
|
|||
|
||||
ASAN_POISON_MEMORY_REGION(wb, sizeof(WriteBuf));
|
||||
ASAN_POISON_MEMORY_REGION(c, c->size());
|
||||
ASAN_UNPOISON_MEMORY_REGION(&c->m_resetCounter, sizeof(c->m_resetCounter));
|
||||
|
||||
server->m_writeBuffers.emplace(capacity, wb);
|
||||
server->m_preallocatedClients.emplace_back(c);
|
||||
|
@ -957,6 +958,7 @@ TCPServer::Client* TCPServer::get_client()
|
|||
void TCPServer::return_client(Client* c)
|
||||
{
|
||||
ASAN_POISON_MEMORY_REGION(c, c->size());
|
||||
ASAN_UNPOISON_MEMORY_REGION(&c->m_resetCounter, sizeof(c->m_resetCounter));
|
||||
m_preallocatedClients.push_back(c);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue