Permalink
Browse files

Add CHECK for out-of-range minRequests

Test Plan: async_io_test

Reviewed By: philipp@fb.com

FB internal diff: D730100
  • Loading branch information...
tudor authored and jdelong committed Mar 7, 2013
1 parent a6fac16 commit 30313905400f94a57c6bf502ce6a1ed0d8888440
Showing with 1 addition and 0 deletions.
  1. +1 −0 folly/experimental/io/AsyncIO.cpp
@@ -154,6 +154,7 @@ void AsyncIO::submit(Op* op) {
Range<AsyncIO::Op**> AsyncIO::wait(size_t minRequests) {
CHECK(ctx_);
CHECK_EQ(pollFd_, -1) << "wait() only allowed on non-pollable object";
+ CHECK_LE(minRequests, pending_);
return doWait(minRequests, pending_);
}

0 comments on commit 3031390

Please sign in to comment.