Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(407)

Issue 265403003: Make sure that ScratchBuffer::Allocate() always return 8-byte aligned address. (Closed)

Created:
6 years, 7 months ago by yzshen1
Modified:
6 years, 7 months ago
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org
Visibility:
Public.

Description

Make sure that ScratchBuffer::Allocate() always return 8-byte aligned addresses. BUG=None TEST=None Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=268405 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=268567

Patch Set 1 #

Total comments: 1

Patch Set 2 : fix on-stack allocation alignment. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -6 lines) Patch
M mojo/public/cpp/bindings/lib/bindings_serialization.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M mojo/public/cpp/bindings/lib/bindings_serialization.cc View 1 1 chunk +15 lines, -2 lines 0 comments Download
M mojo/public/cpp/bindings/lib/scratch_buffer.cc View 1 2 chunks +5 lines, -4 lines 3 comments Download
M mojo/public/cpp/bindings/tests/buffer_unittest.cc View 1 chunk +17 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
yzshen1
Hi, Darin. Would you please take a look? Thanks!
6 years, 7 months ago (2014-05-05 22:53:25 UTC) #1
darin (slow to review)
LGTM https://codereview.chromium.org/265403003/diff/1/mojo/public/cpp/bindings/lib/scratch_buffer.cc File mojo/public/cpp/bindings/lib/scratch_buffer.cc (right): https://codereview.chromium.org/265403003/diff/1/mojo/public/cpp/bindings/lib/scratch_buffer.cc#newcode88 mojo/public/cpp/bindings/lib/scratch_buffer.cc:88: segment->cursor = reinterpret_cast<char*>(segment) + padded_segment_size; good catch!
6 years, 7 months ago (2014-05-05 22:55:52 UTC) #2
darin (slow to review)
LGTM
6 years, 7 months ago (2014-05-05 22:55:52 UTC) #3
yzshen1
The CQ bit was checked by yzshen@chromium.org
6 years, 7 months ago (2014-05-05 22:57:46 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yzshen@chromium.org/265403003/1
6 years, 7 months ago (2014-05-05 22:59:50 UTC) #5
commit-bot: I haz the power
Change committed as 268405
6 years, 7 months ago (2014-05-06 03:50:44 UTC) #6
Mike West
A revert of this CL has been created in https://codereview.chromium.org/262093011/ by mkwst@chromium.org. The reason for ...
6 years, 7 months ago (2014-05-06 07:03:42 UTC) #7
yzshen1
Hi, Darin. Would you please take another look at patchset #2? Thanks!
6 years, 7 months ago (2014-05-06 07:23:08 UTC) #8
darin (slow to review)
LGTM https://codereview.chromium.org/265403003/diff/20001/mojo/public/cpp/bindings/lib/scratch_buffer.cc File mojo/public/cpp/bindings/lib/scratch_buffer.cc (right): https://codereview.chromium.org/265403003/diff/20001/mojo/public/cpp/bindings/lib/scratch_buffer.cc#newcode28 mojo/public/cpp/bindings/lib/scratch_buffer.cc:28: fixed_.cursor = internal::AlignPointer(fixed_data_); maybe we should align fixed_.end ...
6 years, 7 months ago (2014-05-06 07:32:54 UTC) #9
darin (slow to review)
https://codereview.chromium.org/265403003/diff/20001/mojo/public/cpp/bindings/lib/scratch_buffer.cc File mojo/public/cpp/bindings/lib/scratch_buffer.cc (right): https://codereview.chromium.org/265403003/diff/20001/mojo/public/cpp/bindings/lib/scratch_buffer.cc#newcode28 mojo/public/cpp/bindings/lib/scratch_buffer.cc:28: fixed_.cursor = internal::AlignPointer(fixed_data_); On 2014/05/06 07:32:55, darin wrote: > ...
6 years, 7 months ago (2014-05-06 07:35:28 UTC) #10
yzshen1
Thanks, Darin! https://codereview.chromium.org/265403003/diff/20001/mojo/public/cpp/bindings/lib/scratch_buffer.cc File mojo/public/cpp/bindings/lib/scratch_buffer.cc (right): https://codereview.chromium.org/265403003/diff/20001/mojo/public/cpp/bindings/lib/scratch_buffer.cc#newcode28 mojo/public/cpp/bindings/lib/scratch_buffer.cc:28: fixed_.cursor = internal::AlignPointer(fixed_data_); On 2014/05/06 07:32:55, darin ...
6 years, 7 months ago (2014-05-06 08:06:43 UTC) #11
darin (slow to review)
That's a good point. Although I thought it was common for compilers to align structures ...
6 years, 7 months ago (2014-05-06 08:24:04 UTC) #12
yzshen1
The CQ bit was checked by yzshen@chromium.org
6 years, 7 months ago (2014-05-06 17:17:52 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yzshen@chromium.org/265403003/20001
6 years, 7 months ago (2014-05-06 17:18:17 UTC) #14
commit-bot: I haz the power
6 years, 7 months ago (2014-05-06 18:25:51 UTC) #15
Message was sent while issue was closed.
Change committed as 268567

Powered by Google App Engine
This is Rietveld 408576698