blob: bc5f03ebe7baccfd26cdbf564f037a123ba6fdbd [file] [log] [blame]
Brian Silverman2dfc9cf2017-02-19 14:20:40 -08001#include <unistd.h>
Brian Silverman516ceb22015-11-27 01:29:05 -05002
Tyler Chatowbf0609c2021-07-31 16:13:27 -07003#include <cstdlib>
4
Brian Silverman92c3f1e2015-12-08 20:21:31 -05005int main() {
Brian Silverman2dfc9cf2017-02-19 14:20:40 -08006 void *big_chunk = malloc(500000 + read(-1, nullptr, 0));
7 if (write(-1, big_chunk, 0) != -1) return 1;
Brian Silverman92c3f1e2015-12-08 20:21:31 -05008 free(big_chunk);
9}