sapling/eden/fs/utils
Adam Simpkins 9bd173054b fix incorrect deallocation size in UnixSocket::SendQueueDestructor
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
2018-03-08 17:45:57 -08:00
..
test Remove TARGETS files 2018-02-20 19:57:45 -08:00
Bug.cpp minor improvements to EDEN_BUG() 2018-01-05 13:53:23 -08:00
Bug.h minor improvements to EDEN_BUG() 2018-01-05 13:53:23 -08:00
Clock.cpp make Clock::getRealtime() const 2018-02-01 11:19:15 -08:00
Clock.h make Clock::getRealtime() const 2018-02-01 11:19:15 -08:00
ControlMsg.cpp add new ControlMsg helper class 2017-10-10 15:51:15 -07:00
ControlMsg.h add new ControlMsg helper class 2017-10-10 15:51:15 -07:00
DirType.h run clang-format across all C++ files 2017-11-03 16:02:03 -07:00
FutureUnixSocket.cpp run clang-format across eden 2018-01-26 11:20:31 -08:00
FutureUnixSocket.h add version handshake to takeover protocol 2018-01-30 14:21:18 -08:00
HgCommand.cpp Removed all folly::fbstring uses from eden. 2018-01-03 16:41:34 -08:00
HgCommand.h Removed all folly::fbstring uses from eden. 2018-01-03 16:41:34 -08:00
IoFuture.cpp add a new IoFuture helper class 2017-10-10 15:51:15 -07:00
IoFuture.h add a new IoFuture helper class 2017-10-10 15:51:15 -07:00
LeaseCache.h run clang-format across all C++ files 2017-11-03 16:02:03 -07:00
MappedDiskVector.h Enable O_CLOEXEC on MappedDiskVector 2018-03-07 23:11:48 -08:00
PathFuncs.cpp Added joinAndNormalize to PathFuncs with test plus minor cleanup. 2018-01-04 10:11:38 -08:00
PathFuncs.h replaced std::size_t by size_t in fbcode/eden codebase. 2018-02-20 15:30:18 -08:00
PathMap.h run clang-format across all C++ files 2017-11-03 16:02:03 -07:00
SortedInsert.h Fixing merge screw-up caught by Adam TYVM 2018-01-04 14:35:26 -08:00
TimeUtil.cpp run clang-format across all C++ files 2017-11-03 16:02:03 -07:00
TimeUtil.h run clang-format across all C++ files 2017-11-03 16:02:03 -07:00
UnboundedQueueThreadPool.cpp introduce a type representing the unbounded eden cpu pool 2017-12-12 12:35:35 -08:00
UnboundedQueueThreadPool.h introduce a type representing the unbounded eden cpu pool 2017-12-12 12:35:35 -08:00
UnixSocket.cpp fix incorrect deallocation size in UnixSocket::SendQueueDestructor 2018-03-08 17:45:57 -08:00
UnixSocket.h fix incorrect deallocation size in UnixSocket::SendQueueDestructor 2018-03-08 17:45:57 -08:00
XAttr.cpp add fsattr utility for testing purposes 2018-01-30 21:50:39 -08:00
XAttr.h add fsattr utility for testing purposes 2018-01-30 21:50:39 -08:00