sapling/eden/fs/utils
Wez Furlong 950c81858c eden: fix buffer advance in FileDescriptor::wrapFull
Summary:
The loop took care to advance `b` to match the amount
of data that it had processed, but was still passing `buf`
(the unadjusted start of the buffer) to the syscalls.

This meant that in situations where a `readFull` might
encounter a partial read, it would scribble over the start
of the buffer and leave junk at the end.

For example:

write("hell");
write("o");

could produce "oell?" in the buffer when `readFull` consumes
the other end of the pipe.

Reviewed By: xavierd

Differential Revision: D23486270

fbshipit-source-id: 0848f6789b44421b609b91fe08890768ff59f7f5
2020-09-02 23:38:18 -07:00
..
test eden: fix buffer advance in FileDescriptor::wrapFull 2020-09-02 23:38:18 -07:00
BucketedLog.h Tidy up license headers 2019-10-11 05:28:23 -07:00
BufVec.h fuse: move BufVec.h to utils/ 2020-09-02 12:15:48 -07:00
Bug.cpp refactor the EDEN_BUG() macro 2019-11-22 15:38:33 -08:00
Bug.h Remove folly's ColdClass, which was of dubious utility 2020-01-09 13:09:56 -08:00
ChronoParse.cpp Replace Folly Format with fmt in logger to reduce binary size 2019-11-18 05:53:08 -08:00
ChronoParse.h Tidy up license headers 2019-10-11 05:28:23 -07:00
ChronoUnit.cpp Tidy up license headers 2019-10-11 05:28:23 -07:00
ChronoUnit.gperf update license header in remaining files 2019-06-19 17:02:46 -07:00
ChronoUnit.h Tidy up license headers 2019-10-11 05:28:23 -07:00
Clock.cpp add uptime field to DaemonInfo 2020-05-11 11:42:15 -07:00
Clock.h add uptime field to DaemonInfo 2020-05-11 11:42:15 -07:00
CMakeLists.txt eden: introduce SpawnedProcess 2020-09-01 13:31:32 -07:00
CoverageSet.cpp Tidy up license headers 2019-10-11 05:28:23 -07:00
CoverageSet.h Tidy up license headers 2019-10-11 05:28:23 -07:00
DirType.cpp assert that the dtype constants have consistent values on all platforms 2020-04-28 13:23:52 -07:00
DirType.h Cleaning up second definitions of dtype_t 2020-03-10 12:27:51 -07:00
EnumValue.h add enumValue utility function 2020-04-28 17:41:24 -07:00
FaultInjector.cpp build deprecation-clean 2019-11-12 16:31:54 -08:00
FaultInjector.h Tidy up license headers 2019-10-11 05:28:23 -07:00
FileDescriptor.cpp eden: fix buffer advance in FileDescriptor::wrapFull 2020-09-02 23:38:18 -07:00
FileDescriptor.h eden: introduce SpawnedProcess 2020-09-01 13:31:32 -07:00
FileUtils.cpp utils: add a platform independent FileUtils 2020-08-14 18:56:33 -07:00
FileUtils.h utils: add a platform independent FileUtils 2020-08-14 18:56:33 -07:00
Future.h add a collectSafe function 2020-02-03 11:30:50 -08:00
FutureUnixSocket.cpp Tidy up license headers 2019-10-11 05:28:23 -07:00
FutureUnixSocket.h Tidy up license headers 2019-10-11 05:28:23 -07:00
IDGen.cpp Tidy up license headers 2019-10-11 05:28:23 -07:00
IDGen.h Tidy up license headers 2019-10-11 05:28:23 -07:00
IoFuture.cpp Tidy up license headers 2019-10-11 05:28:23 -07:00
IoFuture.h Tidy up license headers 2019-10-11 05:28:23 -07:00
LazyInitialize.h Tidy up license headers 2019-10-11 05:28:23 -07:00
LeaseCache.h Tidy up license headers 2019-10-11 05:28:23 -07:00
MappedDiskVector.h make deleted default constructors explicit 2020-04-14 12:47:03 -07:00
Memory.h Tidy up license headers 2019-10-11 05:28:23 -07:00
PathFuncs.cpp Merge Windows and POSIX version of TestMounts 2020-04-23 12:41:48 -07:00
PathFuncs.h stop using deprecated std::iterator 2020-08-26 17:08:05 -07:00
PathMap.h eden: add CaseSensitive template param to PathMap 2020-09-02 10:19:14 -07:00
Pipe.cpp eden: introduce FileDescriptor and Pipe types 2020-09-01 13:31:32 -07:00
Pipe.h eden: introduce FileDescriptor and Pipe types 2020-09-01 13:31:32 -07:00
ProcessAccessLog.cpp Migrate to field_ref Thrift API 2020-07-21 11:23:35 -07:00
ProcessAccessLog.h use enumValue instead of static_cast<int> 2020-04-28 18:59:34 -07:00
ProcessNameCache.cpp add space between command name and args when logging fetch heavy processes to Scuba 2020-07-31 11:42:51 -07:00
ProcessNameCache.h add space between command name and args when logging fetch heavy processes to Scuba 2020-07-31 11:42:51 -07:00
ProcUtil.cpp utils: add a platform independent FileUtils 2020-08-14 18:56:33 -07:00
ProcUtil.h utils: add a platform independent FileUtils 2020-08-14 18:56:33 -07:00
ServiceAddress.cpp Mark getSelection APIs deprecated 2020-08-11 12:34:15 -07:00
ServiceAddress.h Tidy up license headers 2019-10-11 05:28:23 -07:00
SortedInsert.h Tidy up license headers 2019-10-11 05:28:23 -07:00
SpawnedProcess.cpp utils: use makeWin32ErrorExplicit instead of system_error 2020-09-02 19:47:00 -07:00
SpawnedProcess.h eden: introduce SpawnedProcess 2020-09-01 13:31:32 -07:00
SSLContext.cpp Tidy up license headers 2019-10-11 05:28:23 -07:00
SSLContext.h Tidy up license headers 2019-10-11 05:28:23 -07:00
StatTimes.h eden: add stattimes helpers for win32 2020-04-24 15:57:27 -07:00
Synchronized.h Tidy up license headers 2019-10-11 05:28:23 -07:00
SystemError.h Tidy up license headers 2019-10-11 05:28:23 -07:00
Thread.cpp disable pthread cancellation on the FuseChannel threads 2020-05-08 20:41:50 -07:00
Thread.h disable pthread cancellation on the FuseChannel threads 2020-05-08 20:41:50 -07:00
TimeUtil.cpp Tidy up license headers 2019-10-11 05:28:23 -07:00
TimeUtil.h Tidy up license headers 2019-10-11 05:28:23 -07:00
UnboundedQueueExecutor.cpp Tidy up license headers 2019-10-11 05:28:23 -07:00
UnboundedQueueExecutor.h Tidy up license headers 2019-10-11 05:28:23 -07:00
UnixSocket.cpp warn on unused exception parameter 2019-10-28 17:49:23 -07:00
UnixSocket.h Tidy up license headers 2019-10-11 05:28:23 -07:00
UserInfo.cpp move UserInfo to eden/fs/utils/ 2020-04-29 17:21:12 -07:00
UserInfo.h move UserInfo to eden/fs/utils/ 2020-04-29 17:21:12 -07:00
Utf8.cpp add some utf-8 helper functions 2020-06-10 19:29:51 -07:00
Utf8.h add some utf-8 helper functions 2020-06-10 19:29:51 -07:00
XAttr.cpp Tidy up license headers 2019-10-11 05:28:23 -07:00
XAttr.h Tidy up license headers 2019-10-11 05:28:23 -07:00