Commit ff4513a6 authored by ivica.bogosavljevic's avatar ivica.bogosavljevic Committed by Commit bot

MIPS: Fix `This CL enables precise source positions for all V8 compilers`

Fix c3a6ca68

Fix compilation failure on MIPS and GCC cross compile that started to appear
after the CL c3a6ca68 landed. The compilation
error is due to:

.././src/objects-inl.h:4129:54: error: assuming signed overflow does not occur
when assuming that (X + c) < X is always false [-Werror=strict-overflow]
   DCHECK(index >= 0 && length >= 0 && index + length >= index &&

BUG=

Review-Url: https://codereview.chromium.org/2501963002
Cr-Commit-Position: refs/heads/master@{#41067}
parent f0fa72ba
......@@ -4128,14 +4128,14 @@ void ByteArray::set(int index, byte value) {
}
void ByteArray::copy_in(int index, const byte* buffer, int length) {
DCHECK(index >= 0 && length >= 0 && index + length >= index &&
DCHECK(index >= 0 && length >= 0 && length <= kMaxInt - index &&
index + length <= this->length());
byte* dst_addr = FIELD_ADDR(this, kHeaderSize + index * kCharSize);
memcpy(dst_addr, buffer, length);
}
void ByteArray::copy_out(int index, byte* buffer, int length) {
DCHECK(index >= 0 && length >= 0 && index + length >= index &&
DCHECK(index >= 0 && length >= 0 && length <= kMaxInt - index &&
index + length <= this->length());
const byte* src_addr = FIELD_ADDR(this, kHeaderSize + index * kCharSize);
memcpy(buffer, src_addr, length);
......
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