Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions compiler-rt/lib/hwasan/scripts/hwasan_symbolize
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,12 @@ import html
import json
import mmap
import os
import pathlib
import re
import struct
import subprocess
import sys

if sys.version_info.major < 3:
# Simulate Python 3.x behaviour of defaulting to UTF-8 for print. This is
# important in case any symbols are non-ASCII.
import codecs
sys.stdout = codecs.getwriter("utf-8")(sys.stdout)

# Below, a parser for a subset of ELF. It only supports 64 bit, little-endian,
# and only parses what is necessary to find the build ids. It uses a memoryview
# into an mmap to avoid copying.
Expand Down Expand Up @@ -476,7 +471,7 @@ def main():
# Source location.
paths_to_cut = args.source or []
if not paths_to_cut:
paths_to_cut.append(os.getcwd() + '/')
paths_to_cut.append(pathlib.Path.cwd().as_posix() + '/')
if 'ANDROID_BUILD_TOP' in os.environ:
paths_to_cut.append(os.environ['ANDROID_BUILD_TOP'] + '/')

Expand Down