HomeFreeBSD

Don't use fuword() and suword() on struct members of type int. This
rS117000Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

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

Details

Provenance
marcelAuthored on
Parents
rS116999: Don't map LINUX_POSIX_VDISABLE to _POSIX_VDISABLE and vice versa for
Branches
Unknown
Tags
Unknown

Event Timeline