[openssl-users] 1.1.1 pre1 tests failing on Solaris SPARC

Viktor Dukhovni openssl-users at dukhovni.org
Tue Feb 20 19:08:21 UTC 2018



> On Feb 20, 2018, at 11:36 AM, Norm Green <norm.green at gemtalksystems.com> wrote:
> 
> Your patch tests clean, however there is an easier way which avoids malloc:

Great, so it was the unaligned "buf".  Great.  As for malloc vs. tricks to
align the stack-based array, I see little need to avoid malloc() this is a
test function, not a performance-critical library function.  Exercising
OPENSSL_malloc() is arguably a feature. :-)

That said, I have no religion on which approach is taken to align "buf".
I prefer "malloc" because it unasks the question of which type to use
in an array or union to ensure the "proper" alignment.  Using any of
"long" or "long long" is likely good enough, but could prove more fragile
as the code evolves.

-- 
	Viktor.



More information about the openssl-users mailing list