mirror of
https://github.com/SChernykh/p2pool.git
synced 2025-01-24 11:15:57 +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(wb, sizeof(WriteBuf));
|
||||||
ASAN_POISON_MEMORY_REGION(c, c->size());
|
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_writeBuffers.emplace(capacity, wb);
|
||||||
server->m_preallocatedClients.emplace_back(c);
|
server->m_preallocatedClients.emplace_back(c);
|
||||||
|
@ -957,6 +958,7 @@ TCPServer::Client* TCPServer::get_client()
|
||||||
void TCPServer::return_client(Client* c)
|
void TCPServer::return_client(Client* c)
|
||||||
{
|
{
|
||||||
ASAN_POISON_MEMORY_REGION(c, c->size());
|
ASAN_POISON_MEMORY_REGION(c, c->size());
|
||||||
|
ASAN_UNPOISON_MEMORY_REGION(&c->m_resetCounter, sizeof(c->m_resetCounter));
|
||||||
m_preallocatedClients.push_back(c);
|
m_preallocatedClients.push_back(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue