[AP-UTILS] Bus Error on Linux/Sparc

Erik Rossen ap-utils@kiev.iorta.com
Wed, 31 Jul 2002 09:52:46 +0200


--Hw0FrjWlp+qkNlJP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Jul 29, 2002 at 08:28:34AM +0000, Eric Heydrick wrote:
> With ap-utils 1.0.3 on Debian 3.0/Sparc, I'm getting a "Bus error" when I=
=20
> select Info-> SysInfo in ap-atmel. When I try to get Ethernet or Wireless=
=20
> info, it just sits there without displaying any info.
> Seems this could be a Sparc related issue. Any clues?

I have a Sunblade 100 running woody and I get a bus error too.

If I use gdb:
Program received signal SIGBUS, Bus error.
0x0001a240 in sysinfo () at sysinfo.c:87
87Statio    sprintf(message, _("ProductType: %lu"),
HardConf->ProductType);
(gdb) print &HardConf->ProductType
$1 =3D (long unsigned int *) 0x7b4ca

Unfortunately, 0x7b4ca is not aligned on a 4-byte boundary, thus the
bus error when trying to access HardConf->ProductType.

Two things that I do not understand:

1. I thought that gcc automatically aligns elements of structs if the
architecture of the machine requires it???

2. Why doesn't gdb give a Bus error if I go:
(gdb) print HardConf->ProductType
$2 =3D 0
???


--=20
Erik Rossen                          ^    OpenPGP key: 2935D0B9
rossen@freesurf.ch                  /e\   "Use GnuPG, see the
http://people.linux-gull.ch/rossen  ---    black helicopters."

--Hw0FrjWlp+qkNlJP
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9R5dNY88aPik10LkRAi8iAJ9MG0gXjmxlbsp7dvlOzIg0C9tpQQCfRcPI
Xoa1ONwWnYnC10ePmfWaitc=
=mz+8
-----END PGP SIGNATURE-----

--Hw0FrjWlp+qkNlJP--