Denis Blank 72aa85a759 [C++] Rare bad buffer content alignment if sizeof(T) != alignof(T) (#7520)
* [C++] Add a failing unit test for #7516 (Rare bad buffer content alignment if sizeof(T) != alignof(T))

* [C++] Fix final buffer alignment when using an array of structs
* A struct can have an arbitrary size and therefore sizeof(struct) == alignof(struct)
  does not hold anymore as for value primitives.
* This patch fixes this by introducing alignment parameters to various
  CreateVector*/StartVector calls.
* Closes #7516
2022-09-21 11:05:05 -07:00
2022-09-10 12:36:51 -07:00
2022-08-29 20:43:36 -07:00
2022-03-08 15:39:12 -08:00
2022-08-29 20:43:36 -07:00
2021-06-11 15:27:59 -07:00
2022-08-26 14:35:21 -07:00
2022-08-29 20:43:36 -07:00
2022-09-03 08:05:36 -07:00
2021-05-19 11:55:50 -07:00
2022-08-22 16:53:28 -07:00

logo FlatBuffers

Build status Fuzzing Status OpenSSF Scorecard Join the chat at https://gitter.im/google/flatbuffers Discord Chat Twitter Follow Twitter Follow

FlatBuffers is a cross platform serialization library architected for maximum memory efficiency. It allows you to directly access serialized data without parsing/unpacking it first, while still having great forwards/backwards compatibility.

Go to our landing page to browse our documentation.

Supported operating systems

  • Windows
  • MacOS X
  • Linux
  • Android
  • And any others with a recent C++ compiler (C++ 11 and newer)

Supported programming languages

Code generation and runtime libraries for many popular languages.

  1. C
  2. C++ - snapcraft.io
  3. C# - nuget.org
  4. Dart - pub.dev
  5. Go - go.dev
  6. Java - Maven
  7. JavaScript - NPM
  8. Kotlin
  9. Lobster
  10. Lua
  11. PHP
  12. Python - PyPi
  13. Rust - crates.io
  14. Swift
  15. TypeScript - NPM

and more in progress...

  1. Nim

Contribution

To contribute to this project, see CONTRIBUTING.

Community

Security

Please see our Security Policy for reporting vulnerabilities.

Licensing

Flatbuffers is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.


Languages
C++ 37.8%
Rust 13.5%
Swift 7.7%
Python 6.9%
C# 5.6%
Other 28.5%