https://github.com/openssl/openssl/pull/5423


On 2/20/18, 2:10 PM, "Salz, Rich via openssl-users" 
<openssl-users@openssl.org> wrote:

    I agree, let's just use malloc for the reasons you said.  PR later today.
    
    On 2/20/18, 2:08 PM, "Viktor Dukhovni" <openssl-us...@dukhovni.org> wrote:
    
        
        
        > On Feb 20, 2018, at 11:36 AM, Norm Green 
<norm.gr...@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.
        
        -- 
        openssl-users mailing list
        To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
        
    
    -- 
    openssl-users mailing list
    To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
    

-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users

Reply via email to