Skip to content

Commit 8495983

Browse files
update and fix the crash
1 parent e4e27ba commit 8495983

File tree

18 files changed

+123
-1619
lines changed

18 files changed

+123
-1619
lines changed

.gitattributes

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
# Set default behavior to automatically normalize line endings.
33
###############################################################################
44
* text=auto
5-
*.h linguist-language=C++
6-
*.hpp linguist-language=C++
5+
*.def linguist-language=Assembly
76

87
###############################################################################
98
# Set default behavior for command prompt diff.

Builds/chrome_elf.dll

-36 KB
Binary file not shown.

SpotifyInternal/Spotify.cpp

Lines changed: 0 additions & 49 deletions
This file was deleted.

SpotifyInternal/Spotify.hpp

Lines changed: 0 additions & 20 deletions
This file was deleted.

SpotifyInternal/SpotifyInternal.vcxproj

Lines changed: 23 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,6 @@
99
<Configuration>Release</Configuration>
1010
<Platform>Win32</Platform>
1111
</ProjectConfiguration>
12-
<ProjectConfiguration Include="Debug|x64">
13-
<Configuration>Debug</Configuration>
14-
<Platform>x64</Platform>
15-
</ProjectConfiguration>
16-
<ProjectConfiguration Include="Release|x64">
17-
<Configuration>Release</Configuration>
18-
<Platform>x64</Platform>
19-
</ProjectConfiguration>
2012
</ItemGroup>
2113
<PropertyGroup Label="Globals">
2214
<VCProjectVersion>16.0</VCProjectVersion>
@@ -39,19 +31,6 @@
3931
<WholeProgramOptimization>true</WholeProgramOptimization>
4032
<CharacterSet>Unicode</CharacterSet>
4133
</PropertyGroup>
42-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
43-
<ConfigurationType>DynamicLibrary</ConfigurationType>
44-
<UseDebugLibraries>true</UseDebugLibraries>
45-
<PlatformToolset>v142</PlatformToolset>
46-
<CharacterSet>Unicode</CharacterSet>
47-
</PropertyGroup>
48-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
49-
<ConfigurationType>DynamicLibrary</ConfigurationType>
50-
<UseDebugLibraries>false</UseDebugLibraries>
51-
<PlatformToolset>v142</PlatformToolset>
52-
<WholeProgramOptimization>true</WholeProgramOptimization>
53-
<CharacterSet>Unicode</CharacterSet>
54-
</PropertyGroup>
5534
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
5635
<ImportGroup Label="ExtensionSettings">
5736
</ImportGroup>
@@ -63,116 +42,71 @@
6342
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
6443
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
6544
</ImportGroup>
66-
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
67-
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
68-
</ImportGroup>
69-
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
70-
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
71-
</ImportGroup>
7245
<PropertyGroup Label="UserMacros" />
7346
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
7447
<LinkIncremental>true</LinkIncremental>
7548
</PropertyGroup>
7649
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
7750
<LinkIncremental>false</LinkIncremental>
7851
<TargetName>chrome_elf</TargetName>
79-
<IncludePath>detours\include;$(IncludePath)</IncludePath>
80-
<LibraryPath>detours\libs\x86;$(LibraryPath)</LibraryPath>
81-
</PropertyGroup>
82-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
83-
<LinkIncremental>true</LinkIncremental>
84-
</PropertyGroup>
85-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
86-
<LinkIncremental>false</LinkIncremental>
8752
</PropertyGroup>
8853
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
8954
<ClCompile>
9055
<WarningLevel>Level3</WarningLevel>
9156
<SDLCheck>true</SDLCheck>
9257
<PreprocessorDefinitions>WIN32;_DEBUG;SPOTIFYINTERNAL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
9358
<ConformanceMode>true</ConformanceMode>
94-
<PrecompiledHeader>Use</PrecompiledHeader>
95-
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
59+
<PrecompiledHeader>NotUsing</PrecompiledHeader>
9660
</ClCompile>
9761
<Link>
9862
<SubSystem>Windows</SubSystem>
9963
<GenerateDebugInformation>true</GenerateDebugInformation>
10064
<EnableUAC>false</EnableUAC>
65+
<ModuleDefinitionFile>chrome_elf.def</ModuleDefinitionFile>
10166
</Link>
10267
</ItemDefinitionGroup>
10368
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
104-
<ClCompile>
69+
<ClCompile>
10570
<WarningLevel>Level3</WarningLevel>
71+
<PrecompiledHeader>NotUsing</PrecompiledHeader>
72+
<Optimization>MaxSpeed</Optimization>
10673
<FunctionLevelLinking>true</FunctionLevelLinking>
107-
<IntrinsicFunctions>true</IntrinsicFunctions>
108-
<SDLCheck>true</SDLCheck>
10974
<PreprocessorDefinitions>WIN32;NDEBUG;SPOTIFYINTERNAL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
110-
<ConformanceMode>Default</ConformanceMode>
111-
<PrecompiledHeader>NotUsing</PrecompiledHeader>
112-
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
75+
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
76+
<DebugInformationFormat>None</DebugInformationFormat>
77+
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
78+
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
79+
<ExceptionHandling>Sync</ExceptionHandling>
80+
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
11381
<LanguageStandard>stdcpplatest</LanguageStandard>
114-
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
11582
</ClCompile>
11683
<Link>
11784
<SubSystem>Windows</SubSystem>
11885
<EnableCOMDATFolding>true</EnableCOMDATFolding>
11986
<OptimizeReferences>true</OptimizeReferences>
120-
<GenerateDebugInformation>true</GenerateDebugInformation>
121-
<EnableUAC>false</EnableUAC>
122-
</Link>
123-
</ItemDefinitionGroup>
124-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
125-
<ClCompile>
126-
<WarningLevel>Level3</WarningLevel>
127-
<SDLCheck>true</SDLCheck>
128-
<PreprocessorDefinitions>_DEBUG;SPOTIFYINTERNAL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
129-
<ConformanceMode>true</ConformanceMode>
130-
<PrecompiledHeader>Use</PrecompiledHeader>
131-
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
132-
</ClCompile>
133-
<Link>
134-
<SubSystem>Windows</SubSystem>
135-
<GenerateDebugInformation>true</GenerateDebugInformation>
136-
<EnableUAC>false</EnableUAC>
137-
</Link>
138-
</ItemDefinitionGroup>
139-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
140-
<ClCompile>
141-
<WarningLevel>Level3</WarningLevel>
142-
<FunctionLevelLinking>true</FunctionLevelLinking>
143-
<IntrinsicFunctions>true</IntrinsicFunctions>
144-
<SDLCheck>true</SDLCheck>
145-
<PreprocessorDefinitions>NDEBUG;SPOTIFYINTERNAL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
146-
<ConformanceMode>true</ConformanceMode>
147-
<PrecompiledHeader>Use</PrecompiledHeader>
148-
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
149-
</ClCompile>
150-
<Link>
151-
<SubSystem>Windows</SubSystem>
152-
<EnableCOMDATFolding>true</EnableCOMDATFolding>
153-
<OptimizeReferences>true</OptimizeReferences>
154-
<GenerateDebugInformation>true</GenerateDebugInformation>
155-
<EnableUAC>false</EnableUAC>
87+
<GenerateDebugInformation>false</GenerateDebugInformation>
88+
<ModuleDefinitionFile>chrome_elf.def</ModuleDefinitionFile>
89+
<IgnoreAllDefaultLibraries>
90+
</IgnoreAllDefaultLibraries>
91+
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
92+
<RandomizedBaseAddress>true</RandomizedBaseAddress>
93+
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
94+
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
15695
</Link>
15796
</ItemDefinitionGroup>
15897
<ItemGroup>
15998
<ClCompile Include="dllmain.cpp" />
160-
<ClCompile Include="Spotify.cpp" />
161-
<ClCompile Include="utils.cpp" />
99+
<ClCompile Include="exports.cpp" />
162100
</ItemGroup>
163101
<ItemGroup>
164-
<ClInclude Include="detours\include\detours.h" />
165-
<ClInclude Include="detours\include\detver.h" />
166-
<ClInclude Include="detours\include\syelog.h" />
167-
<ClInclude Include="detours\include\uniHook.hpp" />
168-
<ClInclude Include="memory.hpp" />
169102
<ClInclude Include="resource.h" />
170-
<ClInclude Include="Spotify.hpp" />
171-
<ClInclude Include="utils.hpp" />
172103
</ItemGroup>
173104
<ItemGroup>
174105
<ResourceCompile Include="SpotifyInternal.rc" />
175106
</ItemGroup>
107+
<ItemGroup>
108+
<None Include="chrome_elf.def" />
109+
</ItemGroup>
176110
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
177111
<ImportGroup Label="ExtensionTargets">
178112
</ImportGroup>
Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<ItemGroup>
4-
<Filter Include="Detours">
5-
<UniqueIdentifier>{db4ac997-c267-4462-9553-a1cf3265585c}</UniqueIdentifier>
6-
</Filter>
74
<Filter Include="Source Files">
85
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
96
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
@@ -13,38 +10,19 @@
1310
<ClCompile Include="dllmain.cpp">
1411
<Filter>Source Files</Filter>
1512
</ClCompile>
16-
<ClCompile Include="utils.cpp">
17-
<Filter>Source Files</Filter>
18-
</ClCompile>
19-
<ClCompile Include="Spotify.cpp">
13+
<ClCompile Include="exports.cpp">
2014
<Filter>Source Files</Filter>
2115
</ClCompile>
2216
</ItemGroup>
2317
<ItemGroup>
24-
<ClInclude Include="detours\include\detours.h">
25-
<Filter>Detours</Filter>
26-
</ClInclude>
27-
<ClInclude Include="detours\include\detver.h">
28-
<Filter>Detours</Filter>
29-
</ClInclude>
30-
<ClInclude Include="detours\include\syelog.h">
31-
<Filter>Detours</Filter>
32-
</ClInclude>
33-
<ClInclude Include="detours\include\uniHook.hpp">
34-
<Filter>Detours</Filter>
35-
</ClInclude>
36-
<ClInclude Include="utils.hpp">
37-
<Filter>Source Files</Filter>
38-
</ClInclude>
39-
<ClInclude Include="memory.hpp">
40-
<Filter>Source Files</Filter>
41-
</ClInclude>
42-
<ClInclude Include="Spotify.hpp">
43-
<Filter>Source Files</Filter>
44-
</ClInclude>
4518
<ClInclude Include="resource.h" />
4619
</ItemGroup>
4720
<ItemGroup>
4821
<ResourceCompile Include="SpotifyInternal.rc" />
4922
</ItemGroup>
23+
<ItemGroup>
24+
<None Include="chrome_elf.def">
25+
<Filter>Source Files</Filter>
26+
</None>
27+
</ItemGroup>
5028
</Project>

SpotifyInternal/chrome_elf.def

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
LIBRARY "chrome_elf"
2+
3+
EXPORTS
4+
AddDllToBlacklist
5+
ClearReportsBetween_ExportThunk
6+
CrashForException_ExportThunk
7+
DisableHook
8+
DrainLog
9+
DumpHungProcessWithPtype_ExportThunk
10+
DumpProcessWithoutCrash
11+
GetApplyHookResult
12+
GetBlockedModulesCount
13+
GetCrashReports_ExportThunk
14+
GetCrashpadDatabasePath_ExportThunk
15+
GetHandleVerifier
16+
GetInstallDetailsPayload
17+
GetUniqueBlockedModulesCount
18+
GetUserDataDirectoryThunk
19+
InjectDumpForHungInput_ExportThunk
20+
IsBlacklistInitialized
21+
IsCrashReportingEnabledImpl
22+
IsThirdPartyInitialized
23+
RegisterLogNotification
24+
RequestSingleCrashUpload_ExportThunk
25+
SetCrashKeyValueImpl
26+
SetMetricsClientId
27+
SetUploadConsent_ExportThunk
28+
SignalChromeElf
29+
SignalInitializeCrashReporting
30+
SuccessfullyBlocked

0 commit comments

Comments
 (0)