Commit 9138b23f authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

Allow alignment padding in handler table DCHECK.

This allows handler tables to be followed by (at maximum) 4 bytes of
alignment padding. Data following the handler table (e.g. the constant
pool) might cause such padding to be added.

R=jgruber@chromium.org

Change-Id: Icb1d3156032b847dc805b8e3e63b02c0b29dbd51
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1605723Reviewed-by: 's avatarJunliang Yan <jyan@ca.ibm.com>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61437}
parent 3e6952c9
......@@ -38,7 +38,8 @@ HandlerTable::HandlerTable(Address handler_table, int handler_table_size)
mode_(kReturnAddressBasedEncoding),
#endif
raw_encoded_data_(handler_table) {
DCHECK_EQ(0, handler_table_size % (kReturnEntrySize * sizeof(int32_t)));
static_assert(4 < kReturnEntrySize * sizeof(int32_t), "allowed padding");
DCHECK_GE(4, handler_table_size % (kReturnEntrySize * sizeof(int32_t)));
}
int HandlerTable::GetRangeStart(int index) const {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment