Subject: port-sparc64/14746: Kernel and compiler alignment mismatch
To: None <gnats-bugs@gnats.netbsd.org>
From: None <lloyd@must-have-coffee.gen.nz>
List: netbsd-bugs
Date: 11/26/2001 23:13:34
>Number:         14746
>Category:       port-sparc64
>Synopsis:       Kernel and compiler alignment mismatch
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-sparc64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 26 23:14:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Lloyd Parkes
>Release:        NetBSD-current
>Organization:
Must Have Coffee
>Environment:
NetBSD archangel.must-have-coffee.gen.nz 1.5Y NetBSD 1.5Y (GENERIC) #4: Fri Nov23 01:55:50 NZDT 2001     lloyd@archangel.must-have-coffee.gen.nz:/usr/src/sys/arch/sparc64/compile/GENERIC sparc64

bash-2.05$ cc -dumpmachine
sparc64-netbsd
bash-2.05$ cc -dumpversion
2.95.3
>Description:
The SIOCGIFCONF ioctl returns an interface list that contains items aligned on four bytes boundaries. The system C compiler optimises structure copies and calls to memcpy to be copies of eight byte units. This potential misalignment is realised in ntpd which crashes with SIGBUS in NetBSD-current (and probably NetBSD-1.5.2 and the snapshot from January).
>How-To-Repeat:
Run ntpd.
>Fix:
Decide which side of the fence to sit on. Eight bytes or four bytes.
>Release-Note:
>Audit-Trail:
>Unformatted: