summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2018-11-15 16:07:02 -0800
committerChih-Hung Hsieh <chh@google.com>2018-11-26 13:47:22 -0800
commit9525530ea4ee4d70b55b5b376ad96ecdd587bd39 (patch)
treed2935e8a1391c495bc45667b01520d726183ffdc /testing
parent263dedf8254f22ef57e5746b5bc51d659bf3cdfb (diff)
downloadlibchrome-android-o-mr1-iot-release-1.0.7.tar.gz
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