Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix alignment in chunkedContentCoder #147

Merged
merged 1 commit into from
Nov 30, 2022
Merged

Fix alignment in chunkedContentCoder #147

merged 1 commit into from
Nov 30, 2022

Commits on Nov 19, 2022

  1. Fix alignment in chunkedContentCoder

    An unaligned atomic bug was unfortunately introduced in #119 because the
    `bytesWritten` field was placed at the end of the `chunkedContentCoder`
    struct.
    
    This places this after the bytes.Buffers and the bool causing it to be
    misaligned.
    
    The ideal placement of this variable is not entirely clear but placing
    it before the progresiveWrite bool should help.
    
    An alternative would be to just place this atomic field at the top of
    the struct then there would be no risk of it becoming misaligned in
    future.
    
    I moved a few things around to reduce the size of the struct too but it
    could be possible to adjust things a little more to make the struct a
    little smaller.
    
    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Nov 19, 2022
    Configuration menu
    Copy the full SHA
    7844259 View commit details
    Browse the repository at this point in the history