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++] Rare bad buffer content alignment if sizeof(T) != alignof(T) #7520

Merged
merged 2 commits into from Sep 21, 2022

Commits on Sep 21, 2022

  1. [C++] Add a failing unit test for google#7516 (Rare bad buffer conten…

    …t alignment if sizeof(T) != alignof(T))
    Naios committed Sep 21, 2022
    Copy the full SHA
    5581ee9 View commit details
    Browse the repository at this point in the history
  2. [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 google#7516
    Naios committed Sep 21, 2022
    Copy the full SHA
    d4bc2c6 View commit details
    Browse the repository at this point in the history