diff options
author | Mateusz Moscicki <m.moscicki2@partner.samsung.com> | 2020-04-09 11:46:14 +0200 |
---|---|---|
committer | Mateusz Moscicki <m.moscicki2@partner.samsung.com> | 2020-04-09 12:16:38 +0200 |
commit | 9a97ab265e197017b50517381e911aaf9e627f2a (patch) | |
tree | 137e501f7d054dbd5e627b27222985f65b0f5bec | |
parent | 0faa81b0273881e8b447e09d46b8c9ef7c4047b9 (diff) | |
download | crash-worker-sandbox/mmoscicki2/callstackhash2.tar.gz crash-worker-sandbox/mmoscicki2/callstackhash2.tar.bz2 crash-worker-sandbox/mmoscicki2/callstackhash2.zip |
Fix hash calculationsandbox/mmoscicki2/callstackhash2
Change-Id: I9f343c8c5dbdfe6ac8e39fc0f913c5c1fc1fc0cb
-rw-r--r-- | src/crash-stack/crash-stack.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/crash-stack/crash-stack.c b/src/crash-stack/crash-stack.c index c3406c7..fdef719 100644 --- a/src/crash-stack/crash-stack.c +++ b/src/crash-stack/crash-stack.c @@ -269,8 +269,16 @@ static void __print_hash(Callstack *callstack, struct addr_node *maps) SHA256_Init(&hash_ctx); for (size_t i = 0; i < callstack->elems; i++) { + // We won't be able to substract the start address so we skip + // this entry + if (callstack->proc[i].module_name == NULL) + continue; + struct addr_node *m_node = maps; while (m_node) { + if (m_node->fpath == NULL) + continue; + if (strcmp(m_node->fpath, callstack->proc[i].module_name) == 0) break; |