Skip to content

Commit

Permalink
Merge pull request #11795 from hrydgard/exception-handler
Browse files Browse the repository at this point in the history
Exception handler - catch bad memory accesses by the JIT
  • Loading branch information
hrydgard authored Jul 14, 2020
2 parents 2916e5b + f62df94 commit fe91f62
Show file tree
Hide file tree
Showing 34 changed files with 941 additions and 48 deletions.
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,6 @@ macro(setup_target_project TargetName ProjectDir)
endforeach()
endmacro()

# Commented-out files are files that don't compile
# and were disabled in the original MSVC project anyway

set(CommonX86
Common/ABI.cpp
Common/ABI.h
Expand Down Expand Up @@ -428,6 +425,8 @@ add_library(Common STATIC
Common/Crypto/sha1.h
Common/Crypto/sha256.cpp
Common/Crypto/sha256.h
Common/ExceptionHandlerSetup.cpp
Common/ExceptionHandlerSetup.h
Common/FileUtil.cpp
Common/FileUtil.h
Common/KeyMap.cpp
Expand Down
2 changes: 1 addition & 1 deletion Common/CodeBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class CodeBlockCommon {
CodeBlockCommon() {}
virtual ~CodeBlockCommon() {}

bool IsInSpace(const u8 *ptr) {
bool IsInSpace(const u8 *ptr) const {
return (ptr >= region) && (ptr < (region + region_size));
}

Expand Down
5 changes: 4 additions & 1 deletion Common/Common.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@
<ClInclude Include="Crypto\sha1.h" />
<ClInclude Include="Crypto\sha256.h" />
<ClInclude Include="DbgNew.h" />
<ClInclude Include="ExceptionHandlerSetup.h" />
<ClInclude Include="FileUtil.h" />
<ClInclude Include="FixedSizeQueue.h" />
<ClInclude Include="GL\GLInterfaceBase.h" />
Expand Down Expand Up @@ -397,6 +398,7 @@
<ClInclude Include="Log.h" />
<ClInclude Include="LogManager.h" />
<ClInclude Include="MakeUnique.h" />
<ClInclude Include="MachineContext.h" />
<ClInclude Include="MathUtil.h" />
<ClInclude Include="MemArena.h" />
<ClInclude Include="MemoryUtil.h" />
Expand Down Expand Up @@ -449,6 +451,7 @@
<ClCompile Include="Crypto\md5.cpp" />
<ClCompile Include="Crypto\sha1.cpp" />
<ClCompile Include="Crypto\sha256.cpp" />
<ClCompile Include="ExceptionHandlerSetup.cpp" />
<ClCompile Include="FileUtil.cpp" />
<ClCompile Include="GL\GLInterface\EGL.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
Expand Down Expand Up @@ -521,4 +524,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
5 changes: 4 additions & 1 deletion Common/Common.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
<ClInclude Include="Vulkan\VulkanDebug.h">
<Filter>Vulkan</Filter>
</ClInclude>
<ClInclude Include="ExceptionHandlerSetup.h" />
<ClInclude Include="MachineContext.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="stdafx.cpp" />
Expand Down Expand Up @@ -137,6 +139,7 @@
<ClCompile Include="Vulkan\VulkanDebug.cpp">
<Filter>Vulkan</Filter>
</ClCompile>
<ClCompile Include="ExceptionHandlerSetup.cpp" />
</ItemGroup>
<ItemGroup>
<Filter Include="Crypto">
Expand All @@ -152,4 +155,4 @@
<UniqueIdentifier>{c14d66ef-5f7c-4565-975a-72774e7ccfb9}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>
</Project>
Loading

0 comments on commit fe91f62

Please sign in to comment.