use freshly compiled dump_syms.exe on windows for symbolinfo extraction

while self compiled one still segfaults frequently, it is a tad better
than the included one (and compiling froms source instead of using
precompiled binaries is a net win in any case)

Out of 50 attempts with the mergedlo.dll, the new compiled dump_syms
succeeded 11 times, the shipped one succeeded 7 times - so could still
be regular variance in that small sample size, but at least not
significantly worse either.

Change-Id: I86c213fe6aece58f1391d4c2bf9906b85eee9c57
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117056
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
This commit is contained in:
Christian Lohmaier 2021-06-11 14:44:31 +02:00
parent 3b46c3068a
commit 73299faa75
7 changed files with 182 additions and 3 deletions

View file

@ -430,7 +430,7 @@ symbols:
rm -fr $(WORKDIR)/symbols/
mkdir -p $(WORKDIR)/symbols/
ifeq ($(OS),WNT)
$(SRCDIR)/bin/symbolstore.py $(WORKDIR)/UnpackedTarball/breakpad/src/tools/windows/binaries/dump_syms.exe $(WORKDIR)/symbols/ $(INSTDIR)/program/*
$(SRCDIR)/bin/symbolstore.py $(WORKDIR)/UnpackedTarball/breakpad/src/tools/windows/dump_syms/Release/dump_syms.exe $(WORKDIR)/symbols/ $(INSTDIR)/program/*
$(SRCDIR)/bin/symstore.sh
else
$(SRCDIR)/bin/symbolstore.py $(WORKDIR)/UnpackedTarball/breakpad/src/tools/linux/dump_syms/dump_syms $(WORKDIR)/symbols/ $(INSTDIR)/program/*

View file

@ -16,6 +16,13 @@ $(eval $(call gb_ExternalProject_register_targets,breakpad,\
ifeq ($(COM),MSC)
$(call gb_ExternalProject_get_state_target,breakpad,build) :
$(call gb_Trace_StartRange,breakpad,EXTERNAL)
$(call gb_ExternalProject_run,build,\
MSBuild.exe src/tools/windows/dump_syms/dump_syms.sln -p:Configuration=Release \
)
$(call gb_Trace_EndRange,breakpad,EXTERNAL)
else # !ifeq($(COM),MSC)
$(call gb_ExternalProject_get_state_target,breakpad,build) :

View file

@ -13,11 +13,10 @@ $(eval $(call gb_Module_add_targets,breakpad,\
UnpackedTarball_breakpad \
))
ifneq ($(OS),WNT)
$(eval $(call gb_Module_add_targets,breakpad,\
ExternalProject_breakpad \
))
else
ifeq ($(OS),WNT)
$(eval $(call gb_Module_add_targets,breakpad,\
StaticLibrary_breakpad \
))

View file

@ -22,6 +22,12 @@ $(eval $(call gb_UnpackedTarball_add_patches,breakpad,\
external/breakpad/breakpad-stackwalk.patch.1 \
external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1 \
external/breakpad/c++20-allocator.patch \
external/breakpad/breakpad-dump_syms.patch.1 \
))
$(eval $(call gb_UnpackedTarball_add_files,breakpad,src/tools/windows/dump_syms,\
external/breakpad/dump_syms.vcxproj \
external/breakpad/dump_syms.sln \
))
ifeq ($(COM_IS_CLANG),TRUE)

View file

@ -0,0 +1,34 @@
diff -ur breakpad.org/src/common/windows/pdb_source_line_writer.cc breakpad/src/common/windows/pdb_source_line_writer.cc
--- breakpad.org/src/common/windows/pdb_source_line_writer.cc 2021-06-11 12:37:22.682324700 +0200
+++ breakpad/src/common/windows/pdb_source_line_writer.cc 2021-06-11 12:44:24.480184800 +0200
@@ -34,7 +34,7 @@
#include <atlbase.h>
#include <dia2.h>
#include <diacreate.h>
-#include <ImageHlp.h>
+#include <dbghelp.h>
#include <stdio.h>
#include <algorithm>
diff -ur breakpad.org/src/common/windows/pe_util.cc breakpad/src/common/windows/pe_util.cc
--- breakpad.org/src/common/windows/pe_util.cc 2021-06-11 12:37:22.682324700 +0200
+++ breakpad/src/common/windows/pe_util.cc 2021-06-11 12:52:34.542708600 +0200
@@ -35,6 +35,7 @@
#include <ImageHlp.h>
#include <functional>
+#include <memory>
#include "common/windows/string_utils-inl.h"
#include "common/windows/guid_string.h"
diff -ur breakpad.org/src/tools/windows/dump_syms/dump_syms.cc breakpad/src/tools/windows/dump_syms/dump_syms.cc
--- breakpad.org/src/tools/windows/dump_syms/dump_syms.cc 2021-06-11 12:37:20.697959400 +0200
+++ breakpad/src/tools/windows/dump_syms/dump_syms.cc 2021-06-11 12:41:16.922559700 +0200
@@ -33,6 +33,7 @@
#include <stdio.h>
#include <wchar.h>
+#include <memory>
#include <string>
#include "common/windows/pdb_source_line_writer.h"

25
external/breakpad/dump_syms.sln vendored Normal file
View file

@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31229.75
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dump_syms", "dump_syms.vcxproj", "{792E1530-E2C5-4289-992E-317BA30E9D9F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{792E1530-E2C5-4289-992E-317BA30E9D9F}.Debug|x86.ActiveCfg = Debug|Win32
{792E1530-E2C5-4289-992E-317BA30E9D9F}.Debug|x86.Build.0 = Debug|Win32
{792E1530-E2C5-4289-992E-317BA30E9D9F}.Release|x86.ActiveCfg = Release|Win32
{792E1530-E2C5-4289-992E-317BA30E9D9F}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {86FBC9CF-7AF1-4996-BB80-EB24CCFC561A}
EndGlobalSection
EndGlobal

108
external/breakpad/dump_syms.vcxproj vendored Normal file
View file

@ -0,0 +1,108 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{792E1530-E2C5-4289-992E-317BA30E9D9F}</ProjectGuid>
<RootNamespace>dumpsyms</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>16.0.31227.257</_ProjectFileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>Debug\</OutDir>
<IntDir>Debug\</IntDir>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>Release\</OutDir>
<IntDir>Release\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(VSInstallDir)\DIA SDK\include;..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>$(VSInstallDir)\DIA SDK\lib\diaguids.lib;Dbghelp.lib;imagehlp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>$(VSInstallDir)\DIA SDK\include;..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>$(VSInstallDir)\DIA SDK\lib\diaguids.lib;Dbghelp.lib;imagehlp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\..\..\common\windows\dia_util.h" />
<ClInclude Include="..\..\..\common\windows\guid_string.h" />
<ClInclude Include="..\..\..\common\windows\omap.h" />
<ClInclude Include="..\..\..\common\windows\omap_internal.h" />
<ClInclude Include="..\..\..\common\windows\pdb_source_line_writer.h" />
<ClInclude Include="..\..\..\common\windows\string_utils-inl.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\common\windows\dia_util.cc" />
<ClCompile Include="..\..\..\common\windows\guid_string.cc" />
<ClCompile Include="..\..\..\common\windows\omap.cc" />
<ClCompile Include="..\..\..\common\windows\pdb_source_line_writer.cc" />
<ClCompile Include="..\..\..\common\windows\pe_source_line_writer.cc" />
<ClCompile Include="..\..\..\common\windows\pe_util.cc" />
<ClCompile Include="..\..\..\common\windows\string_utils.cc" />
<ClCompile Include="dump_syms.cc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>