Skip to content

Commit

Permalink
under gcc 9.3.1 pe_dll_list's std::unordered_map causes infinite comp…
Browse files Browse the repository at this point in the history
…ilation time, I change it to make it compile in no time, and I'm using O(log_2 n) algorithm, which theoretically is slower than std::unordered_map but here it will be quicker
  • Loading branch information
Hana Dusíková committed Aug 6, 2020
1 parent 7f807bd commit e22de94
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 100 deletions.
2 changes: 1 addition & 1 deletion include/retdec/fileformat/file_format/pe/pe_format.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class PeFormat : public FileFormat
std::string typeRefHashSha256; ///< .NET typeref table hash as SHA256
VisualBasicInfo visualBasicInfo; ///< visual basic header information

static const std::unordered_set<std::string> defDllList; ///< Default set of DLLs for checking dependency missing
std::unordered_set<std::string> dllList; ///< Override set of DLLs for checking dependency missing
bool errorLoadingDllList; ///< If true, then an error happened while loading DLL list

Expand Down Expand Up @@ -75,6 +74,7 @@ class PeFormat : public FileFormat
void loadResources();
void loadCertificates();
void loadTlsInformation();
static bool checkDefaultList(std::string_view);
/// @}

/// @name .NET methods
Expand Down
Loading

0 comments on commit e22de94

Please sign in to comment.