git: dc46f063d11e - stable/15 - sys/abi_compat.h: fix UB for bintime32 handling
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 27 Jan 2026 00:39:43 UTC
The branch stable/15 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=dc46f063d11eb7928d46b498002438f4ab56bbe6
commit dc46f063d11eb7928d46b498002438f4ab56bbe6
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-01-12 04:46:15 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-01-27 00:38:22 +0000
sys/abi_compat.h: fix UB for bintime32 handling
(cherry picked from commit be1b2da855cc38531733b5c97891cd4a40a993bc)
---
sys/compat/freebsd32/freebsd32.h | 2 +-
sys/sys/abi_compat.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/compat/freebsd32/freebsd32.h b/sys/compat/freebsd32/freebsd32.h
index 7324f9adf70c..7d21a5be5570 100644
--- a/sys/compat/freebsd32/freebsd32.h
+++ b/sys/compat/freebsd32/freebsd32.h
@@ -70,7 +70,7 @@ struct itimerspec32 {
struct bintime32 {
time32_t sec;
- uint32_t frac[2];
+ freebsd32_uint64_t frac;
};
struct ffclock_estimate32 {
diff --git a/sys/sys/abi_compat.h b/sys/sys/abi_compat.h
index 0a7110191430..bd99a21d8e23 100644
--- a/sys/sys/abi_compat.h
+++ b/sys/sys/abi_compat.h
@@ -77,7 +77,7 @@
#define BT_CP(src, dst, fld) do { \
CP((src).fld, (dst).fld, sec); \
- *(uint64_t *)&(dst).fld.frac[0] = (src).fld.frac; \
+ FU64_CP((src).fld, (dst).fld, frac); \
} while (0)
#endif /* !_COMPAT_H_ */