* [PATCH] bsd-user: freebsd/os-stat: fix getdents(2)
@ 2025-02-13 12:12 Meowthink
2025-02-27 13:18 ` Ping: " Meowthink
0 siblings, 1 reply; 2+ messages in thread
From: Meowthink @ 2025-02-13 12:12 UTC (permalink / raw)
To: qemu-devel; +Cc: Warner Losh, Kyle Evans
Syscall getdents(2) has been historically mistaken the pointer in the
loop. This influences aarch64 python3.12 built by cosmopolitan
/superconfigure thus been found out.
Signed-off-by: Meowthink <meowthink@googlemail.com>
---
bsd-user/freebsd/os-stat.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/bsd-user/freebsd/os-stat.h b/bsd-user/freebsd/os-stat.h
index 3bdc66aa98..5e14331e0b 100644
--- a/bsd-user/freebsd/os-stat.h
+++ b/bsd-user/freebsd/os-stat.h
@@ -475,6 +475,7 @@ static inline abi_long do_freebsd11_getdents(abi_long arg1,
de->d_reclen = tswap16(reclen);
de->d_fileno = tswap32(de->d_fileno);
len -= reclen;
+ de = (struct freebsd11_dirent *)((void *)de + reclen);
}
}
return ret;
base-commit: de278e54aefed143526174335f8286f7437d20be
--
2.42.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-27 13:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-13 12:12 [PATCH] bsd-user: freebsd/os-stat: fix getdents(2) Meowthink
2025-02-27 13:18 ` Ping: " Meowthink
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).