Merge pull request #1921 from ogniK5377/no-unit

Fixed uninitialized memory due to missing returns in canary
This commit is contained in:
bunnei 2018-12-21 14:12:54 -05:00 committed by GitHub
commit e75e8b9580
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 34 additions and 3 deletions

View file

@ -67,6 +67,7 @@ public:
6, "ShaderTrianglesAdjacency");
default:
UNREACHABLE_MSG("Unknown primitive mode.");
return LazyGeometryProgram(geometry_programs.points, "points", 1, "ShaderPoints");
}
}

View file

@ -364,6 +364,7 @@ public:
return value;
default:
UNREACHABLE_MSG("Unimplemented conversion size: {}", static_cast<u32>(size));
return value;
}
}
@ -626,6 +627,7 @@ public:
return "floatBitsToInt(" + value + ')';
} else {
UNREACHABLE();
return value;
}
}
@ -2062,6 +2064,8 @@ private:
std::to_string(instr.alu.GetSignedImm20_20())};
default:
UNREACHABLE();
return {regs.GetRegisterAsInteger(instr.gpr39, 0, false),
std::to_string(instr.alu.GetSignedImm20_20())};
}
}();
const std::string offset = '(' + packed_shift + " & 0xff)";
@ -3312,6 +3316,7 @@ private:
return std::to_string(instr.r2p.immediate_mask);
default:
UNREACHABLE();
return std::to_string(instr.r2p.immediate_mask);
}
}();
const std::string mask = '(' + regs.GetRegisterAsInteger(instr.gpr8, 0, false) +
@ -3775,7 +3780,10 @@ private:
}
break;
}
default: { UNIMPLEMENTED_MSG("Unhandled instruction: {}", opcode->get().GetName()); }
default: {
UNIMPLEMENTED_MSG("Unhandled instruction: {}", opcode->get().GetName());
break;
}
}
break;
@ -3930,4 +3938,4 @@ std::optional<ProgramResult> DecompileProgram(const ProgramCode& program_code, u
return {};
}
} // namespace OpenGL::GLShader::Decompiler
} // namespace OpenGL::GLShader::Decompiler

View file

@ -427,6 +427,7 @@ static const char* GetSource(GLenum source) {
RET(OTHER);
default:
UNREACHABLE();
return "Unknown source";
}
#undef RET
}
@ -445,6 +446,7 @@ static const char* GetType(GLenum type) {
RET(MARKER);
default:
UNREACHABLE();
return "Unknown type";
}
#undef RET
}