]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
FreeBSD regtest: new aio test sometimes hangs in infinite aio_error loop
authorPaul Floyd <pjfloyd@wanadoo.fr>
Thu, 23 Nov 2023 06:45:09 +0000 (07:45 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Thu, 23 Nov 2023 06:45:09 +0000 (07:45 +0100)
Put a limit on the loop. Need to check if this is not a problem with
aio_read corrupting memory.

memcheck/tests/freebsd/aio.c
memcheck/tests/freebsd/aio.stderr.exp

index 999eecb6f6531f71fd69dda35aa295811030ebe9..54e8006d33ba05764e0d32fbaad241a9f4c96073 100644 (file)
@@ -59,7 +59,12 @@ int main(void)
    // (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)
 
index b40b054d15f0d0518faaaff72330d43ccff70fb2..1578e573e481a52714ba5d63d3c846092c15f25d 100644 (file)
@@ -16,7 +16,7 @@ Conditional jump or move depends on uninitialised value(s)
 
 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