sshd broken on arm?

Nicholas Clark nick at ccl4.org
Fri Jan 25 03:39:18 PST 2008


On Fri, Jan 25, 2008 at 12:23:09PM +0100, Dag-Erling Smrgrav wrote:

> None of this matters.  What John pointed out means that the code is
> wrong and the compiler is right.  The code is not allowed to assume that
> an object is correctly aligned unless it is of a type that requires the
> correct alignment.  The easiest way to do this is with a union, e.g.

Whilst that is correct, why is the compiler changing the alignment of the
struct for different optimiser settings but all other flags identical?
[Have I got that right?] Surely that's a compiler bug too?

(In that it is in breach of an ABI, even if ANSI permits different padding
for any different compiler flags, making no special reference to
"optimisation")

Nicholas Clark


More information about the freebsd-arm mailing list