From 085d310af6b860b00245c0ceb88c9cc8413ae67e Mon Sep 17 00:00:00 2001 From: d00573793 Date: Fri, 24 Mar 2023 18:41:45 +0800 Subject: [PATCH] [Pin-server] Optimized LocalVarSummeryPass diff --git a/user/LocalVarSummeryPass.cpp b/user/LocalVarSummeryPass.cpp index b7e104e..4f72a2a 100755 --- a/user/LocalVarSummeryPass.cpp +++ b/user/LocalVarSummeryPass.cpp @@ -35,6 +35,7 @@ static void LocalVarSummery(void) vector allFunction = pluginAPI.GetAllFunc(); map args = PluginServer::GetInstance()->GetArgs(); for (size_t i = 0; i < allFunction.size(); i++) { + if (allFunction[i] == nullptr) continue; uint64_t funcID = allFunction[i].idAttr().getValue().getZExtValue(); fprintf(stderr, "In the %ldth function:\n", i); vector decls = pluginAPI.GetDecls(funcID); @@ -73,6 +74,7 @@ static void LocalVarSummery(void) } for (size_t j = 0; j < decls.size(); j++) { auto decl = decls[j]; + if (decl == nullptr) continue; string name = decl.symNameAttr().getValue().str(); int64_t declTypeID = decl.typeIDAttr().getValue().getZExtValue(); if (declTypeID == typeFilter) { -- 2.33.0