bus error and check fail on solaris 2.6

Werner Koch wk at isil.d.shuttle.de
Mon Feb 22 23:21:55 CET 1999

Remi Guyomarch <rguyom at mail.dotcom.fr> writes:

> +     char __alignment[4]; /* align context[] on a 8-byte boundary */
>       char context[1];

Right.  I have to use either an union of some types, use a type which
fulfills all alignment requests or use memcpy to access the variable
in the contect :-)

> PS: Why can't we use a simple malloc() for variable-size buffers,
> contexts, etc ... malloc() will give us properly aligned pointers

Because we would then need 2 mallocs.  I think I broke this thing some 
time ago.  I'm going to fix this tomorrow.



ceterum censeo RSA esse delendam

More information about the Gnupg-devel mailing list