diff --git a/VTIL-Architecture/routine/routine.hpp b/VTIL-Architecture/routine/routine.hpp index 2b88bc2..d40e834 100644 --- a/VTIL-Architecture/routine/routine.hpp +++ b/VTIL-Architecture/routine/routine.hpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include "../arch/identifier.hpp" #include "instruction.hpp" @@ -74,7 +75,7 @@ namespace vtil // Cache of explored blocks, mapping virtual instruction pointer to the basic block structure. // - std::unordered_map explored_blocks; + std::map explored_blocks; // Cache of paths from block A to block B. // @@ -98,7 +99,7 @@ namespace vtil // Convention of specialized calls, maps the vip of the VXCALL instruction onto the convention used. // - std::unordered_map spec_subroutine_conventions; + std::map spec_subroutine_conventions; // Misc. stats. // diff --git a/VTIL-Common/util/transform_parallel.hpp b/VTIL-Common/util/transform_parallel.hpp index 53eafda..9fefc3a 100644 --- a/VTIL-Common/util/transform_parallel.hpp +++ b/VTIL-Common/util/transform_parallel.hpp @@ -36,7 +36,7 @@ // Determine whether or not to use parallel transformations. // #ifndef VTIL_USE_PARALLEL_TRANSFORM - #define VTIL_USE_PARALLEL_TRANSFORM true + #define VTIL_USE_PARALLEL_TRANSFORM false #endif namespace vtil diff --git a/VTIL-Compiler/optimizer/branch_correction_pass.cpp b/VTIL-Compiler/optimizer/branch_correction_pass.cpp index e9a0964..36f65f6 100644 --- a/VTIL-Compiler/optimizer/branch_correction_pass.cpp +++ b/VTIL-Compiler/optimizer/branch_correction_pass.cpp @@ -48,11 +48,21 @@ namespace vtil::optimizer // cached_tracer local_tracer = {}; auto lbranch_info = aux::analyze_branch( blk, &local_tracer, {} ); + auto log_branch_info = [](const auto& branch_info, const char* name) { + logger::log("\n%s, cc: %s, is_jcc: %d, is_vm_exit: %d\n", name, branch_info.cc, branch_info.is_jcc, branch_info.is_vm_exit); + for (const auto& dest : branch_info.destinations) + { + logger::log(" dest: %s\n", dest); + } + }; + log_branch_info(lbranch_info, "lbranch_info"); + ctracer.mtx.lock(); for ( auto& [k, v] : local_tracer.cache ) ctracer.cache[ k ] = v; ctracer.mtx.unlock(); auto branch_info = aux::analyze_branch( blk, &ctracer, { .cross_block = true, .pack = true, .resolve_opaque = true } ); + log_branch_info(branch_info, "branch_info"); // If branching to real, assert single next block. // diff --git a/VTIL-SymEx/simplifier/simplifier.hpp b/VTIL-SymEx/simplifier/simplifier.hpp index b7e862d..39a1dd5 100644 --- a/VTIL-SymEx/simplifier/simplifier.hpp +++ b/VTIL-SymEx/simplifier/simplifier.hpp @@ -36,7 +36,7 @@ // Determine whether we should log the details of the simplification process. // #ifndef VTIL_SYMEX_SIMPLIFY_VERBOSE - #define VTIL_SYMEX_SIMPLIFY_VERBOSE 0 + #define VTIL_SYMEX_SIMPLIFY_VERBOSE 1 #endif // [Configuration]