mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 917242 - Symbolize ASan traces in automation. r=ted
This commit is contained in:
parent
0989c0d0ea
commit
8fc307d856
@ -798,3 +798,7 @@ bin/libfreebl_32int64_3.so
|
||||
@BINPATH@/metro/defaults
|
||||
@BINPATH@/metro/modules
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_ASAN
|
||||
@BINPATH@/llvm-symbolizer
|
||||
#endif
|
||||
|
@ -512,6 +512,12 @@ class Automation(object):
|
||||
|
||||
# ASan specific environment stuff
|
||||
if self.IS_ASAN and (self.IS_LINUX or self.IS_MAC):
|
||||
# Symbolizer support
|
||||
llvmsym = os.path.join(xrePath, "llvm-symbolizer")
|
||||
if os.path.isfile(llvmsym):
|
||||
env["ASAN_SYMBOLIZER_PATH"] = llvmsym
|
||||
self.log.info("INFO | automation.py | ASan using symbolizer at %s", llvmsym)
|
||||
|
||||
try:
|
||||
totalMemory = int(os.popen("free").readlines()[1].split()[1])
|
||||
|
||||
|
@ -6,6 +6,14 @@
|
||||
|
||||
SDK_BINARY = run-mozilla.sh
|
||||
|
||||
ifneq ($(LLVM_SYMBOLIZER),)
|
||||
# Install a copy of the llvm-symbolizer binary to dist/bin, so it can
|
||||
# be used for symbolizing traces for e.g. AddressSanitizer
|
||||
LLVMSYM_EXECUTABLES=$(LLVM_SYMBOLIZER)
|
||||
LLVMSYM_DEST=$(FINAL_TARGET)
|
||||
INSTALL_TARGETS += LLVMSYM
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
libs:: $(srcdir)/run-mozilla.sh
|
||||
|
@ -3,6 +3,7 @@
|
||||
# Use Clang as specified in manifest
|
||||
export CC="$topsrcdir/clang/bin/clang -fgnu89-inline"
|
||||
export CXX="$topsrcdir/clang/bin/clang++"
|
||||
export LLVM_SYMBOLIZER="$topsrcdir/clang/bin/llvm-symbolizer"
|
||||
|
||||
# Mandatory flags for ASan
|
||||
export ASANFLAGS="-fsanitize=address -Dxmalloc=myxmalloc -fPIC"
|
||||
|
@ -1212,8 +1212,10 @@ MOZ_ARG_ENABLE_BOOL(address-sanitizer,
|
||||
if test -n "$MOZ_ASAN"; then
|
||||
MOZ_LLVM_HACKS=1
|
||||
AC_DEFINE(MOZ_ASAN)
|
||||
MOZ_PATH_PROG(LLVM_SYMBOLIZER, llvm-symbolizer)
|
||||
fi
|
||||
AC_SUBST(MOZ_ASAN)
|
||||
AC_SUBST(LLVM_SYMBOLIZER)
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Enable hacks required for LLVM instrumentations
|
||||
|
@ -298,11 +298,18 @@ JITTEST_VALGRIND_FLAG = --valgrind
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef MOZ_ASAN
|
||||
ifneq ($(LLVM_SYMBOLIZER),)
|
||||
# Use the LLVM symbolizer when running jit-tests under ASan, if available
|
||||
JITTEST_ASAN_ENV=ASAN_SYMBOLIZER_PATH='$(LLVM_SYMBOLIZER)'
|
||||
endif
|
||||
endif
|
||||
|
||||
check-style::
|
||||
(cd $(srcdir) && $(PYTHON) config/check_spidermonkey_style.py);
|
||||
|
||||
check-jit-test::
|
||||
$(wildcard $(RUN_TEST_PROGRAM)) $(PYTHON) -u $(srcdir)/jit-test/jit_test.py \
|
||||
$(JITTEST_ASAN_ENV) $(wildcard $(RUN_TEST_PROGRAM)) $(PYTHON) -u $(srcdir)/jit-test/jit_test.py \
|
||||
--no-slow --no-progress --tinderbox --tbpl $(JITTEST_VALGRIND_FLAG) \
|
||||
$(DIST)/bin/$(JS_SHELL_NAME)$(BIN_SUFFIX)
|
||||
|
||||
|
@ -89,6 +89,12 @@ class CPPUnitTests(object):
|
||||
env[pathvar] = "%s%s%s" % (self.xre_path, os.pathsep, env[pathvar])
|
||||
else:
|
||||
env[pathvar] = self.xre_path
|
||||
|
||||
# Use llvm-symbolizer for ASan if available/required
|
||||
llvmsym = os.path.join(self.xre_path, "llvm-symbolizer")
|
||||
if os.path.isfile(llvmsym):
|
||||
env["ASAN_SYMBOLIZER_PATH"] = llvmsym
|
||||
|
||||
return env
|
||||
|
||||
def run_tests(self, programs, xre_path, symbols_path=None):
|
||||
|
Loading…
Reference in New Issue
Block a user