Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix alignment in chunkedContentCoder
An unaligned atomic bug was unfortunately introduced in blevesearch#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>
- Loading branch information