• kenton@google.com's avatar
    Fixed alignment issue that caused bus errors on platforms like sparc which · d0580eaf
    kenton@google.com authored
    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.
    d0580eaf
Name
Last commit
Last update
editors Loading commit data...
examples Loading commit data...
java Loading commit data...
m4 Loading commit data...
python Loading commit data...
src Loading commit data...
vsprojects Loading commit data...
CHANGES.txt Loading commit data...
CONTRIBUTORS.txt Loading commit data...
COPYING.txt Loading commit data...
INSTALL.txt Loading commit data...
Makefile.am Loading commit data...
README.txt Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
generate_descriptor_proto.sh Loading commit data...