mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 00:45:18 +03:00
9bd173054b
Summary: In some cases we could call `delete` with the wrong size in `UnixSocket::SendQueueDestructor` when `__cpp_sized_deallocation` is available. In particular, if the input message data contained some empty buffers in the IOBuf chain we would allocate room for these elements when initially performing the allocation in `createSendQueueEntry()`, but we would skip over them in the `SendQueueEntry` constructor, so `iovCount` did not include them. The `SendQueueDestructor` code used `iovCount` to calculate how much space had been allocated, and so it would undercount the amount of allocated space in this case. This updates `createSendQueueEntry()` to also avoid allocating an iovec entry for the empty buffers, so that `iovCount` should always accurately reflect how many entries were originally allocated. Reviewed By: chadaustin Differential Revision: D7190579 fbshipit-source-id: 422cc737f146adeb1c133b9f3b500038e05bad10 |
||
---|---|---|
.. | ||
test | ||
Bug.cpp | ||
Bug.h | ||
Clock.cpp | ||
Clock.h | ||
ControlMsg.cpp | ||
ControlMsg.h | ||
DirType.h | ||
FutureUnixSocket.cpp | ||
FutureUnixSocket.h | ||
HgCommand.cpp | ||
HgCommand.h | ||
IoFuture.cpp | ||
IoFuture.h | ||
LeaseCache.h | ||
MappedDiskVector.h | ||
PathFuncs.cpp | ||
PathFuncs.h | ||
PathMap.h | ||
SortedInsert.h | ||
TimeUtil.cpp | ||
TimeUtil.h | ||
UnboundedQueueThreadPool.cpp | ||
UnboundedQueueThreadPool.h | ||
UnixSocket.cpp | ||
UnixSocket.h | ||
XAttr.cpp | ||
XAttr.h |