mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-21 12:17:56 -05:00
Fixed uninitialized memory due to missing returns in canary
Functions which are suppose to crash on non canary builds usually don't return anything which lead to uninitialized memory being used.
This commit is contained in:
@ -67,6 +67,7 @@ public:
|
||||
6, "ShaderTrianglesAdjacency");
|
||||
default:
|
||||
UNREACHABLE_MSG("Unknown primitive mode.");
|
||||
return LazyGeometryProgram(geometry_programs.points, "points", 1, "ShaderPoints");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2064,6 +2066,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)";
|
||||
@ -3314,6 +3318,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) +
|
||||
@ -3777,7 +3782,9 @@ private:
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: { UNIMPLEMENTED_MSG("Unhandled instruction: {}", opcode->get().GetName()); }
|
||||
default: {
|
||||
UNIMPLEMENTED_MSG("Unhandled instruction: {}", opcode->get().GetName());
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
@ -3932,4 +3939,4 @@ std::optional<ProgramResult> DecompileProgram(const ProgramCode& program_code, u
|
||||
return {};
|
||||
}
|
||||
|
||||
} // namespace OpenGL::GLShader::Decompiler
|
||||
} // namespace OpenGL::GLShader::Decompiler
|
||||
|
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user