Skip to content

Commit efa2b2f

Browse files
committed
Make async_kill_with_syscallbuf2 run long enough on 32-bit systems
On x86-32 it exits after 2^32 iterations of ``` 0x08048485 <+117>: addl $0x1,-0xc(%ebp) 0x08048489 <+121>: cmpl $0xffffffff,-0xc(%ebp) 0x0804848d <+125>: jne 0x8048485 <main+117> ``` which often completes in less than one second on my Arrow Lake system... So do 2^64 iterations on x86-32 like we do on the 64-bit platforms.
1 parent 9851846 commit efa2b2f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/test/async_kill_with_syscallbuf2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include "util.h"
44

55
int main(void) {
6-
unsigned long iteration = 0;
6+
uint64_t iteration = 0;
77
int pipe_fds[2];
88
pipe(pipe_fds);
99

@@ -16,7 +16,7 @@ int main(void) {
1616
// Write again.
1717
write(pipe_fds[1], "hi\n", 3);
1818

19-
while (iteration < ULONG_MAX) {
19+
while (iteration < UINT64_MAX) {
2020
iteration += 1;
2121
// Don't let the compiler delete this loop.
2222
asm("" : : : "memory");

0 commit comments

Comments
 (0)