Commit 72424435 authored by michaelbai's avatar michaelbai Committed by Commit bot

Fix crash when process APK log without offset

Found crash in apk, but there is no offset, like below
DEBUG   :     #04 pc 0000000000209998  /data/app/org.chromium.chrome-1/base.apk

BUG=630620

Review-Url: https://codereview.chromium.org/2176693002
Cr-Commit-Position: refs/heads/master@{#407172}
parent 52051960
...@@ -273,7 +273,7 @@ class PreProcessLog: ...@@ -273,7 +273,7 @@ class PreProcessLog:
match = _TRACE_LINE.match(line) match = _TRACE_LINE.match(line)
if match: if match:
lib, symbol_present = match.group('lib', 'symbol_present') lib, symbol_present = match.group('lib', 'symbol_present')
if os.path.splitext(lib)[1] == '.apk': if os.path.splitext(lib)[1] == '.apk' and symbol_present:
soname = self._DetectSharedLibrary(lib, symbol_present) soname = self._DetectSharedLibrary(lib, symbol_present)
if soname: if soname:
line = line.replace('/' + os.path.basename(lib), '/' + soname) line = line.replace('/' + os.path.basename(lib), '/' + soname)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment