Put a limit on the loop. Need to check if this is not a problem with
aio_read corrupting memory.
// (don't crash on the repeated &a)
assert( aio_read(&a) == 0 );
- while (0 != aio_error(&a)) { }
+ int try_count = 0;
+ while (0 != aio_error(&a) && try_count < 10000) {
+ ++try_count;
+ }
+
+ assert(try_count < 10000);
assert( aio_return(&a) > 0 ); // XXX: (undefined value error here)
Syscall param aio_write(iocb->aio_buf) points to unaddressable byte(s)
at 0x........: aio_write (in /...libc...)
- by 0x........: main (aio.c:77)
+ by 0x........: main (aio.c:82)
Address 0x........ is not stack'd, malloc'd or (recently) free'd