From 30313905400f94a57c6bf502ce6a1ed0d8888440 Mon Sep 17 00:00:00 2001 From: Tudor Bosman Date: Thu, 7 Mar 2013 07:45:16 -0800 Subject: [PATCH] Add CHECK for out-of-range minRequests Test Plan: async_io_test Reviewed By: philipp@fb.com FB internal diff: D730100 --- folly/experimental/io/AsyncIO.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/folly/experimental/io/AsyncIO.cpp b/folly/experimental/io/AsyncIO.cpp index 16473e7f..addcc7e1 100644 --- a/folly/experimental/io/AsyncIO.cpp +++ b/folly/experimental/io/AsyncIO.cpp @@ -154,6 +154,7 @@ void AsyncIO::submit(Op* op) { Range 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_); } -- 2.34.1