aboutsummaryrefslogtreecommitdiffhomepage
path: root/m4
diff options
context:
space:
mode:
authorGravatar kenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2008-11-07 02:07:18 +0000
committerGravatar kenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2008-11-07 02:07:18 +0000
commitd0580eafd34a5b2fb816f73598497394108f2fd7 (patch)
tree6cd6c2e6afb1d591c7520c1fe789ba41f16be2de /m4
parentde754375737bf251e2ddc5bb6904c74da0954a25 (diff)
Fixed alignment issue that caused bus errors on platforms like sparc which
require all memory reads to be aligned. Specifically, it turns out that sizeof(RepeatedField<bool>) is 20 on 64-bit sparc with GCC 3.4.6. This is strange, since one of RepeatedField's members is a pointer, which I thought meant that it had to be 64-bit aligned, which means its size should be a multiple of 64 bits. But, 20 is not a multiple of 8. I don't understand why this is the case, but if this is possible, then DynamicMessage's strategy of sorting fields in descending order by size and then tightly packing doesn't work. To fix this, I got rid of the sort step and instead added code that aligns each field's offset appropriately based on the field's size. Also in this revision: Fix an error message that named a flag incorrectly.
Diffstat (limited to 'm4')
0 files changed, 0 insertions, 0 deletions