Commit 77585f14 authored by Calder Kitagawa's avatar Calder Kitagawa Committed by Commit Bot

[Zucchini]: Change |kInvalidOffset| in image_utils.h

In preparation for a large upcoming DEX support CL |kInvalidOffset|
needs to change as the Dalvik standard uses 0xFFFFFFF*F*U as a sentinel
value. Instead use 0xFFFFFFF*E* to indicate |kInvalidOffset|.

Change-Id: I8ada5beb8e0f5bef28dadb8c6401f95665670b91
Reviewed-on: https://chromium-review.googlesource.com/978380Reviewed-by: default avatarSamuel Huang <huangs@chromium.org>
Commit-Queue: Calder Kitagawa <ckitagawa@google.com>
Cr-Commit-Position: refs/heads/master@{#546120}
parent fec208ee
......@@ -20,7 +20,8 @@ namespace zucchini {
using offset_t = uint32_t;
// Divide by 2 since label marking uses the most significant bit.
constexpr offset_t kOffsetBound = static_cast<offset_t>(-1) / 2;
constexpr offset_t kInvalidOffset = static_cast<offset_t>(-1);
// Use 0xFFFFFFF*E*, since 0xFFFFFFF*F* is a sentinel value for Dex references.
constexpr offset_t kInvalidOffset = static_cast<offset_t>(-2);
// key_t is used to identify an offset in a table.
using key_t = uint32_t;
......
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