Date: Sat, 28 Jun 2003 12:45:15 -0700 (PDT) From: Marcel Moolenaar <marcel@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern kern_thread.c src/sys/sys kse.h Message-ID: <200306281945.h5SJjFjF059714@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
marcel 2003/06/28 12:45:15 PDT
FreeBSD src repository
Modified files:
sys/kern kern_thread.c
sys/sys kse.h
Log:
Don't use fuword() and suword() on struct members of type int. This
happens to work on 32-bit platforms as sizeof(long)=sizeof(int), but
wrecks all kinds of havoc (garbage reads, corrupting writes and
misaligned loads/stores) on 64-bit architectures.
The fix for now is to use fuword32() and suword32() and change the
type of the applicable int fields to int32. This is to make it
explicit that we depend on these fields being 32-bit. We may want
to revisit this later.
Reviewed by: deischen
Revision Changes Path
1.147 +4 -4 src/sys/kern/kern_thread.c
1.17 +3 -3 src/sys/sys/kse.h
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200306281945.h5SJjFjF059714>
