diff options
author | Chih-Hung Hsieh <chh@google.com> | 2018-11-15 16:07:02 -0800 |
---|---|---|
committer | Chih-Hung Hsieh <chh@google.com> | 2018-11-26 13:47:22 -0800 |
commit | 9525530ea4ee4d70b55b5b376ad96ecdd587bd39 (patch) | |
tree | d2935e8a1391c495bc45667b01520d726183ffdc /testing | |
parent | 263dedf8254f22ef57e5746b5bc51d659bf3cdfb (diff) | |
download | libchrome-android-o-mr1-iot-release-1.0.7.tar.gz |
Update asserts in mojo about int64_t's alignmentandroid-wear-8.0.0_r2android-o-mr1-iot-release-1.0.7android-n-iot-release-ihome-igv1nougat-iot-release
The purpose of these asserts is to check that the options structs are aligned
sufficiently that an int64_t (or similar) could be added to them. The asserts
were added in https://codereview.chromium.org/295383012
However, the alignment of int64_t on 32-bit x86 is actually 4 bytes, not 8. So
how did this ever work? Before Clang r345419, the alignof() operator (which is what
MOJO_ALIGNOF maps to) would return the *preferred alignment* of a type, not
the *ABI alignment*. That's not what the C and C++ standards specify, so the
bug was fixed and the asserts started firing. (See also
https://llvm.org/pr26547)
To fix the build, change the asserts to check that int64_t requires 8 bytes
alignment *or less*.
Bug: 900406
Bug: 119634736
Test: make checkbuild
Change-Id: Icf80cea80ac31082423faab8c192420d0b98d515
Reviewed-on: https://chromium-review.googlesource.com/c/1318971
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#605699}
Diffstat (limited to 'testing')
0 files changed, 0 insertions, 0 deletions