dropbear fails on uClinux ARM NOMMU target with gcc-3.4.5 but not gcc-2.95.3
Jamie Lokier
jamie at shareable.org
Thu Jan 12 08:30:48 WST 2006
Regarding dropbear 0.47 (not 0.43 as this thread started with), I have
seen consistent bus errors when compiling with the default options and
GCC 3.4.3 on an ARM CPU with no MMU. (GCC from uclinux-tools-20050221).
I was unable to use Dropbear's client at all with this compiler.
GCC 2.95.3 for the same system was fine.
If I add the flag "-fno-strict-aliasing" to CFLAGS in Dropbear's
Makefile, then it seems to be fixed. Well, so far I haven't seen any
of these bus errors.
If that is really fixing the problem, it indicates a type-aliasing
error in Dropbear or the associated libraries. These errors can be
fixed by accessing the type-aliased memory through a union (as
described in the GCC manual), or with sufficiently recent GCC
versions, using the "may_alias" attribute. Alternatively, simply
using "-fno-strict-aliasing" is fine although it suppress some
optimisation possibilities. But look at it this way: the Linux kernel
uses that flag, so it can't be too bad.
Until they are fixed, I recommend adding -fno-strict-aliasing to
Dropbear's CFLAGS. The flag is accepted by GCC 2.95 too, and I think
it's redundant with that version.
Enjoy,
-- Jamie
More information about the Dropbear
mailing list