From 54ac698a7d3ea4adabf11aa97dbe18e7af38e384 Mon Sep 17 00:00:00 2001 From: Andrew Quijano Date: Sun, 18 Aug 2024 22:01:28 -0400 Subject: [PATCH] [FBI] Add debug symbols for easier debugging --- tools/fbi/src/CMakeLists.txt | 2 +- tools/fbi/src/find_bug_inj.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/fbi/src/CMakeLists.txt b/tools/fbi/src/CMakeLists.txt index 3568dad4..33e0c9c2 100644 --- a/tools/fbi/src/CMakeLists.txt +++ b/tools/fbi/src/CMakeLists.txt @@ -6,7 +6,7 @@ add_executable(fbi find_bug_inj.cpp) set_property(TARGET fbi PROPERTY CXX_STANDARD 17) #if (${DEBUG}) -# target_compile_options(fbi PRIVATE -fno-omit-frame-pointer -g -O0) + target_compile_options(fbi PRIVATE -fno-omit-frame-pointer -g -O0) #else() # target_compile_options(fbi PRIVATE -flto -O3) # set_target_properties(fbi PROPERTIES LINK_FLAGS "-flto -fuse-ld=gold") diff --git a/tools/fbi/src/find_bug_inj.cpp b/tools/fbi/src/find_bug_inj.cpp index ba7cab00..6a6277d6 100644 --- a/tools/fbi/src/find_bug_inj.cpp +++ b/tools/fbi/src/find_bug_inj.cpp @@ -246,13 +246,13 @@ void update_unique_taint_sets(Json::Value& tquls) { int max_index = tquls["label"].size() - 1; if (it == ptr_to_labelset.end() || p < it->first) { - std::vector vec; - // Populate contents of vector with that of "label" - for (Json::Value& element : tquls["label"]) { - vec.push_back(std::strtoul(element.asString().c_str(), 0, 0)); - } + std::vector vec; + // Populate contents of vector with that of "label" + for (Json::Value& element : tquls["label"]) { + vec.push_back(std::strtoul(element.asString().c_str(), 0, 0)); + } - const LabelSet *ls = create(LabelSet{0, p, inputfile, vec}); + const LabelSet *ls = create(LabelSet{0, p, inputfile, vec}); ptr_to_labelset.insert(it, std::make_pair(p, ls)); auto &labels = ls->labels;