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

[C++] Flatbuffer binary fails to verify alignment for int64 in a vector of tables #8474

Open
ghkinoo opened this issue Jan 3, 2025 · 0 comments

Comments

@ghkinoo
Copy link

ghkinoo commented Jan 3, 2025

While attempting to update to the latest flatbuffers library (v24.12.23), some of our serialized buffers started to fail verification. In particular they couldn't verify the alignment of an int64 field in a table that's within a vector. I reproduced the issue here: https://github.com/ghkinoo/test_flatbuffer

The gist of it though:

table TestTable {
    test_id: string;
    test_long: long;
}

table TestRoot {
    tests: [TestTable];
}
{
  "tests": [
    {
      "test_id": "test1",
      "test_long": 8569750533
    }
  ]
}

test_long doesn't align to 8 in the subsequent binary, as far as the verifier is concerned at least.

This may be related to this #8397

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant