• Kenton Varda's avatar
    Fixes #219, with POSSIBLE (but obscure) WIRE FORMAT BREAKAGE. · db7ca960
    Kenton Varda authored
    Unfortunately, the layout algorithm had a bug which caused incorrect layout when declaring a union whose lowest-ordinal field was of type Void and nested in an inner union. That is:
    
        union {
          a :union {
            b @0 :Void
            ...
          }
          ...
        }
    
    In this case, all the fields in the struct after the Void field -- including both unions' discriminants -- would end up misplaced. Although they did not end up overlapping (and therefore the incorrect layout "worked"), the result broke schema evolution rules around "retroactive unionization".
    
    Unfortunately, we must break compatibility with any protocol that happened to contain the above pattern. Luckily, it's a fairly obscure case. Unluckily, Cap'n Proto's own schema format contains such a pattern. Luckily, the use of this pattern was introduced in v0.6.x and therefore has not been in any release build so far.
    db7ca960
Name
Last commit
Last update
..
cmake Loading commit data...
ekam-provider Loading commit data...
m4 Loading commit data...
samples Loading commit data...
src Loading commit data...
CMakeLists.txt Loading commit data...
LICENSE.txt Loading commit data...
Makefile.am Loading commit data...
Makefile.ekam Loading commit data...
README.txt Loading commit data...
capnp-rpc.pc.in Loading commit data...
capnp.pc.in Loading commit data...
configure.ac Loading commit data...
regenerate-bootstraps.sh Loading commit data...
setup-autotools.sh Loading commit data...
setup-ekam.sh Loading commit data...