mirror of
https://github.com/yuzu-emu/breakpad
synced 2024-11-26 13:18:04 +00:00
Fix compile errors arising from compiling breakpad with clang.
These compile errors occur when building the check target with: CXX=clang++-3.8 CXXFLAGS="-Werror -Wconstant-conversion -g -O2 -std=c++11" src/processor/stackwalker_mips.cc:60:9: error: comparison of constant 18446744073709551615 with expression of type 'bool' is always false [Werror,-Wtautological-constant-out-of-range-compare] > 0xffffffffffffffff) { ^ ~~~~~~~~~~~~~~~~~~ src/processor/stackwalker_mips.cc:68:66: error: comparison of constant 4294967295 with expression of type 'bool' is always false [-Werror,-Wtautological-constant-out-of-range-compare] if ((memory_ && memory_->GetBase() + memory_->GetSize() - 1) > 0xffffffff) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~ Change-Id: I29eed8f4a67b9feeb274aa1fc6c79a019135e8d6 Reviewed-on: https://chromium-review.googlesource.com/438445 Reviewed-by: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
parent
6cc037526e
commit
fd28a5bbe9
1 changed files with 17 additions and 16 deletions
|
@ -55,9 +55,9 @@ StackwalkerMIPS::StackwalkerMIPS(const SystemInfo* system_info,
|
||||||
StackFrameSymbolizer* resolver_helper)
|
StackFrameSymbolizer* resolver_helper)
|
||||||
: Stackwalker(system_info, memory, modules, resolver_helper),
|
: Stackwalker(system_info, memory, modules, resolver_helper),
|
||||||
context_(context) {
|
context_(context) {
|
||||||
|
if (memory_) {
|
||||||
if (context_->context_flags & MD_CONTEXT_MIPS64 ) {
|
if (context_->context_flags & MD_CONTEXT_MIPS64 ) {
|
||||||
if ((memory_ && memory_->GetBase() + memory_->GetSize() - 1)
|
if (0xffffffffffffffff - memory_->GetBase() < memory_->GetSize() - 1) {
|
||||||
> 0xffffffffffffffff) {
|
|
||||||
BPLOG(ERROR) << "Memory out of range for stackwalking mips64: "
|
BPLOG(ERROR) << "Memory out of range for stackwalking mips64: "
|
||||||
<< HexString(memory_->GetBase())
|
<< HexString(memory_->GetBase())
|
||||||
<< "+"
|
<< "+"
|
||||||
|
@ -65,7 +65,7 @@ StackwalkerMIPS::StackwalkerMIPS(const SystemInfo* system_info,
|
||||||
memory_ = NULL;
|
memory_ = NULL;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((memory_ && memory_->GetBase() + memory_->GetSize() - 1) > 0xffffffff) {
|
if (0xffffffff - memory_->GetBase() < memory_->GetSize() - 1) {
|
||||||
BPLOG(ERROR) << "Memory out of range for stackwalking mips32: "
|
BPLOG(ERROR) << "Memory out of range for stackwalking mips32: "
|
||||||
<< HexString(memory_->GetBase())
|
<< HexString(memory_->GetBase())
|
||||||
<< "+"
|
<< "+"
|
||||||
|
@ -74,6 +74,7 @@ StackwalkerMIPS::StackwalkerMIPS(const SystemInfo* system_info,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
StackFrame* StackwalkerMIPS::GetContextFrame() {
|
StackFrame* StackwalkerMIPS::GetContextFrame() {
|
||||||
if (!context_) {
|
if (!context_) {
|
||||||
|
|
Loading…
Reference in a new issue