summaryrefslogtreecommitdiff
path: root/view/sharedcache/core/VM.h
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2025-02-18 18:03:06 -0500
committerGlenn Smith <glenn@vector35.com>2025-02-26 14:17:52 -0500
commitb3cfd46356af3416d72bd6593bb2a397e72554b6 (patch)
tree0c1a5120a2764c7b64746da902b17d04409043d7 /view/sharedcache/core/VM.h
parent4bda0ac97e4961cbb0c5d050fc66989135519aac (diff)
[SharedCache] Fix loading DSC BNDB from a local project crashing
Also fixes a BinaryViewRef leak
Diffstat (limited to 'view/sharedcache/core/VM.h')
-rw-r--r--view/sharedcache/core/VM.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/view/sharedcache/core/VM.h b/view/sharedcache/core/VM.h
index 44bd5e63..e245751a 100644
--- a/view/sharedcache/core/VM.h
+++ b/view/sharedcache/core/VM.h
@@ -79,7 +79,7 @@ public:
std::string_view filePath() const { return m_filePath; }
private:
- std::string m_filePath;
+ std::string m_filePath;
};
uint64_t MMapCount();
@@ -93,7 +93,7 @@ public:
MMappedFileAccessor(const std::string &path);
~MMappedFileAccessor();
- static std::shared_ptr<LazyMappedFileAccessor> Open(BinaryNinja::Ref<BinaryNinja::BinaryView> dscView, const uint64_t sessionID, const std::string &path, std::function<void(std::shared_ptr<MMappedFileAccessor>)> postAllocationRoutine = nullptr);
+ static std::shared_ptr<LazyMappedFileAccessor> Open(const uint64_t sessionID, const std::string &path, std::function<void(std::shared_ptr<MMappedFileAccessor>)> postAllocationRoutine = nullptr);
static void CloseAll(const uint64_t sessionID);
@@ -163,7 +163,7 @@ class FileAccessorCache
public:
static FileAccessorCache& Shared();
- std::shared_ptr<LazyMappedFileAccessor> OpenLazily(BinaryNinja::Ref<BinaryNinja::BinaryView> dscView,
+ std::shared_ptr<LazyMappedFileAccessor> OpenLazily(
const uint64_t sessionID, const std::string& path,
std::function<void(std::shared_ptr<MMappedFileAccessor>)> postAllocationRoutine);
@@ -173,7 +173,7 @@ private:
FileAccessorCache();
std::shared_ptr<MMappedFileAccessor> Open(
- BinaryNinja::Ref<BinaryNinja::BinaryView> dscView, const uint64_t sessionID, const std::string& path);
+ const uint64_t sessionID, const std::string& path);
void Close(MMappedFileAccessor* accessor);