diff options
author | Thomas McGuire <thomas.mcguire@kdab.com> | 2018-02-13 15:30:53 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-05-03 12:41:36 +0000 |
commit | 8db1665ade734265254404eea8a4cc291ca1205d (patch) | |
tree | 33b23c7bfcb4953684b4a056082f22221ed88235 /app | |
parent | 94093989c58d3afab3aaf278d1d761d06361045e (diff) |
Ignore kallsyms mappings with address 0
kallsyms files with all addresses being 0 can happen. In this case,
ignore the mapping, as otherwise an address would resolve to a random
kernel symbol.
In addition, now perfparser shows a correct error message about being
unable to open the mapping.
Fixes KDAB/hotspot#117
Change-Id: Ib7ccf2f405f3a0a2149fa747175fb9feb11dfb07
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Diffstat (limited to 'app')
-rw-r--r-- | app/perfkallsyms.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/perfkallsyms.cpp b/app/perfkallsyms.cpp index 1a64cbd..0ef016e 100644 --- a/app/perfkallsyms.cpp +++ b/app/perfkallsyms.cpp @@ -62,7 +62,8 @@ bool PerfKallsyms::parseMapping(const QString &path) if (eol == '\t') stream >> entry.module; - m_entries.push_back(entry); + if (entry.address != 0) + m_entries.push_back(entry); } if (valid && m_entries.isEmpty()) { |