mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1514209 - Enable the crashreporter code on Windows arm64 builds. r=froydnj
But keep the crashreporter disabled at runtime because it doesn't work yet. This has the side effect of creating the artifacts with the crashreporter symbols and pdbs. Differential Revision: https://phabricator.services.mozilla.com/D14550 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
1aa11d21e1
commit
7864034d32
@ -24,6 +24,3 @@ export MOZ_TELEMETRY_REPORTING=1
|
||||
|
||||
# Package js shell.
|
||||
export MOZ_PACKAGE_JSSHELL=1
|
||||
|
||||
# Crashreporter does peculiar things.
|
||||
ac_add_options --disable-crashreporter
|
||||
|
@ -2,8 +2,6 @@
|
||||
MOZ_AUTOMATION_L10N_CHECK=0
|
||||
. "$topsrcdir/browser/config/mozconfigs/common"
|
||||
|
||||
ac_add_options --disable-crashreporter
|
||||
|
||||
. "$topsrcdir/browser/config/mozconfigs/win64-aarch64/common-win64"
|
||||
|
||||
. "$topsrcdir/build/mozconfig.stylo"
|
||||
|
@ -15,7 +15,7 @@ if [ -d "${VSPATH}" ]; then
|
||||
# Need to run x86-64 host binaries.
|
||||
export PATH="${VSPATH}/VC/bin/Hostx64/x64:${VSPATH}/SDK/bin/${win_sdk_version}/x64:${VSPATH}/VC/redist/x64/Microsoft.VC141.CRT:${VSPATH}/SDK/Redist/ucrt/DLLs/x64:${WIN_DIA_SDK_BIN_DIR}:${PATH}"
|
||||
|
||||
export INCLUDE="${VSPATH}/VC/include:${VSPATH}/VC/atlmfc/include:${VSPATH}/SDK/Include/${win_sdk_version}/ucrt:${VSPATH}/SDK/Include/${win_sdk_version}/shared:${VSPATH}/SDK/Include/${win_sdk_version}/um:${VSPATH}/SDK/Include/${win_sdk_version}/winrt"
|
||||
export INCLUDE="${VSPATH}/VC/include:${VSPATH}/VC/atlmfc/include:${VSPATH}/SDK/Include/${win_sdk_version}/ucrt:${VSPATH}/SDK/Include/${win_sdk_version}/shared:${VSPATH}/SDK/Include/${win_sdk_version}/um:${VSPATH}/SDK/Include/${win_sdk_version}/winrt:${VSPATH}/DIA SDK/include"
|
||||
export LIB="${VSPATH}/VC/lib/arm64:${VSPATH}/VC/atlmfc/lib/arm64:${VSPATH}/SDK/Lib/${win_sdk_version}/ucrt/arm64:${VSPATH}/SDK/Lib/${win_sdk_version}/um/arm64:${VSPATH}/DIA SDK/lib/amd64"
|
||||
|
||||
# We need to declare host and target tools separately.
|
||||
|
@ -2606,7 +2606,8 @@ extern JS_FRIEND_API JSObject* GetJSMEnvironmentOfScriptedCaller(JSContext* cx);
|
||||
// other embedding such as a Gecko FrameScript. Caller can check compartment.
|
||||
extern JS_FRIEND_API bool IsJSMEnvironment(JSObject* obj);
|
||||
|
||||
#if defined(XP_WIN) && defined(_WIN64)
|
||||
// Matches the condition in js/src/jit/ProcessExecutableMemory.cpp
|
||||
#if defined(XP_WIN) && defined(HAVE_64BIT_BUILD) && defined(_M_X64)
|
||||
// Parameters use void* types to avoid #including windows.h. The return value of
|
||||
// this function is returned from the exception handler.
|
||||
typedef long (*JitExceptionHandler)(void* exceptionRecord, // PEXECTION_RECORD
|
||||
|
@ -1002,6 +1002,8 @@ win64-aarch64-msvc/debug:
|
||||
index:
|
||||
product: firefox
|
||||
job-name: win64-aarch64-msvc-debug
|
||||
attributes:
|
||||
enable-full-crashsymbols: true
|
||||
treeherder:
|
||||
platform: windows2012-aarch64/debug
|
||||
symbol: Bmsvc
|
||||
@ -1037,6 +1039,8 @@ win64-aarch64-msvc/opt:
|
||||
index:
|
||||
product: firefox
|
||||
job-name: win64-aarch64-msvc-opt
|
||||
attributes:
|
||||
enable-full-crashsymbols: true
|
||||
treeherder:
|
||||
platform: windows2012-aarch64/opt
|
||||
symbol: Bmsvc
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
#include "MinidumpAnalyzerUtils.h"
|
||||
|
||||
#if XP_WIN && HAVE_64BIT_BUILD
|
||||
#if XP_WIN && HAVE_64BIT_BUILD && defined(_M_X64)
|
||||
#include "MozStackFrameSymbolizer.h"
|
||||
#endif
|
||||
|
||||
@ -329,7 +329,7 @@ static void ConvertProcessStateToJSON(const ProcessState& aProcessState,
|
||||
static bool ProcessMinidump(Json::Value& aStackTraces,
|
||||
Json::Value& aCertSubjects, const string& aDumpFile,
|
||||
const bool aFullStacks) {
|
||||
#if XP_WIN && HAVE_64BIT_BUILD
|
||||
#if XP_WIN && HAVE_64BIT_BUILD && defined(_M_X64)
|
||||
MozStackFrameSymbolizer symbolizer;
|
||||
MinidumpProcessor minidumpProcessor(&symbolizer, false);
|
||||
#else
|
||||
|
@ -365,7 +365,7 @@ static LPTOP_LEVEL_EXCEPTION_FILTER WINAPI patched_SetUnhandledExceptionFilter(
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
#ifdef _WIN64
|
||||
#if defined(HAVE_64BIT_BUILD) && defined(_M_X64)
|
||||
static LPTOP_LEVEL_EXCEPTION_FILTER sUnhandledExceptionFilter = nullptr;
|
||||
|
||||
static long JitExceptionHandler(void* exceptionRecord, void* context) {
|
||||
@ -1403,16 +1403,18 @@ static nsresult LocateExecutable(nsIFile* aXREDirectory,
|
||||
nsresult SetExceptionHandler(nsIFile* aXREDirectory, bool force /*=false*/) {
|
||||
if (gExceptionHandler) return NS_ERROR_ALREADY_INITIALIZED;
|
||||
|
||||
#if !defined(DEBUG)
|
||||
// In non-debug builds, enable the crash reporter by default, and allow
|
||||
#if defined(DEBUG) || defined(_M_ARM64)
|
||||
// In debug builds, disable the crash reporter by default, and allow to
|
||||
// enable it with the MOZ_CRASHREPORTER environment variable.
|
||||
// Likewise for Windows arm64 builds, where the crashreporter doesn't
|
||||
// work properly yet.
|
||||
const char* envvar = PR_GetEnv("MOZ_CRASHREPORTER");
|
||||
if ((!envvar || !*envvar) && !force) return NS_OK;
|
||||
#else
|
||||
// In other builds, enable the crash reporter by default, and allow
|
||||
// disabling it with the MOZ_CRASHREPORTER_DISABLE environment variable.
|
||||
const char* envvar = PR_GetEnv("MOZ_CRASHREPORTER_DISABLE");
|
||||
if (envvar && *envvar && !force) return NS_OK;
|
||||
#else
|
||||
// In debug builds, disable the crash reporter by default, and allow to
|
||||
// enable it with the MOZ_CRASHREPORTER environment variable.
|
||||
const char* envvar = PR_GetEnv("MOZ_CRASHREPORTER");
|
||||
if ((!envvar || !*envvar) && !force) return NS_OK;
|
||||
#endif
|
||||
|
||||
#if defined(XP_WIN)
|
||||
@ -1568,7 +1570,7 @@ nsresult SetExceptionHandler(nsIFile* aXREDirectory, bool force /*=false*/) {
|
||||
// Initially set sIncludeContextHeap to true for debugging startup crashes
|
||||
// even if the controlling pref value is false.
|
||||
SetIncludeContextHeap(true);
|
||||
#ifdef _WIN64
|
||||
#if defined(HAVE_64BIT_BUILD) && defined(_M_X64)
|
||||
// Tell JS about the new filter before we disable SetUnhandledExceptionFilter
|
||||
SetJitExceptionHandler();
|
||||
#endif
|
||||
@ -3291,7 +3293,7 @@ bool SetRemoteExceptionHandler(const nsACString& crashPipe,
|
||||
NS_ConvertASCIItoUTF16(crashPipe).get(), nullptr);
|
||||
gExceptionHandler->set_handle_debug_exceptions(true);
|
||||
|
||||
#ifdef _WIN64
|
||||
#if defined(HAVE_64BIT_BUILD) && defined(_M_X64)
|
||||
SetJitExceptionHandler();
|
||||
#endif
|
||||
|
||||
|
@ -41,7 +41,7 @@ void PureVirtualCall() {
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
#if XP_WIN && HAVE_64BIT_BUILD && !defined(__MINGW32__)
|
||||
#if XP_WIN && HAVE_64BIT_BUILD && defined(_M_X64) && !defined(__MINGW32__)
|
||||
// Implementation in win64unwindInfoTests.asm
|
||||
uint64_t x64CrashCFITest_NO_MANS_LAND(uint64_t returnpfn, void*);
|
||||
uint64_t x64CrashCFITest_Launcher(uint64_t returnpfn, void* testProc);
|
||||
@ -78,7 +78,7 @@ const int16_t CRASH_X64CFI_SAVE_XMM128_FAR = 18;
|
||||
const int16_t CRASH_X64CFI_EPILOG = 19;
|
||||
const int16_t CRASH_X64CFI_EOF = 20;
|
||||
|
||||
#if XP_WIN && HAVE_64BIT_BUILD && !defined(__MINGW32__)
|
||||
#if XP_WIN && HAVE_64BIT_BUILD && defined(_M_X64) && !defined(__MINGW32__)
|
||||
|
||||
typedef decltype(&x64CrashCFITest_UnknownOpcode) win64CFITestFnPtr_t;
|
||||
|
||||
@ -149,7 +149,7 @@ extern "C" NS_EXPORT void Crash(int16_t how) {
|
||||
ThrowException();
|
||||
break;
|
||||
}
|
||||
#if XP_WIN && HAVE_64BIT_BUILD && !defined(__MINGW32__)
|
||||
#if XP_WIN && HAVE_64BIT_BUILD && defined(_M_X64) && !defined(__MINGW32__)
|
||||
case CRASH_X64CFI_UNKNOWN_OPCODE:
|
||||
case CRASH_X64CFI_PUSH_NONVOL:
|
||||
case CRASH_X64CFI_ALLOC_SMALL:
|
||||
@ -200,7 +200,7 @@ extern "C" NS_EXPORT void TryOverrideExceptionHandler() {
|
||||
#endif
|
||||
|
||||
extern "C" NS_EXPORT uint32_t GetWin64CFITestFnAddrOffset(int16_t fnid) {
|
||||
#if XP_WIN && HAVE_64BIT_BUILD && !defined(__MINGW32__)
|
||||
#if XP_WIN && HAVE_64BIT_BUILD && defined(_M_X64) && !defined(__MINGW32__)
|
||||
// fnid uses the same constants as Crash().
|
||||
// Returns the RVA of the requested function.
|
||||
// Returns 0 on failure.
|
||||
|
Loading…
Reference in New Issue
Block a user