13 CHECK ((handle =
open (
"sample.txt")) > 1,
"open \"sample.txt\"");
14 read (handle, (
char *) &handle - 4096, 1);
15 fail (
"survived reading data into bad address");
int open(const char *file)
int read(int fd, void *buffer, unsigned size)
void fail(const char *format,...)
#define CHECK(SUCCESS,...)
Takes an expression to test for SUCCESS and a message, which may include printf-style arguments.
void test_main(void)
Reads from a file into a bad address.