From 8d5c21ecf804e4913c7ac7b24a05947a3283df94 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Tue, 1 Apr 2025 14:49:05 -0400 Subject: [SharedCache] Fix the triage symbol table data races Any update to the model should only happen on the UI thread now. This also fixes the other issue here: https://github.com/Vector35/binaryninja-api/issues/6300 --- view/sharedcache/ui/symboltable.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'view/sharedcache/ui/symboltable.h') diff --git a/view/sharedcache/ui/symboltable.h b/view/sharedcache/ui/symboltable.h index 41e2597e..53c71874 100644 --- a/view/sharedcache/ui/symboltable.h +++ b/view/sharedcache/ui/symboltable.h @@ -15,7 +15,9 @@ class SymbolTableModel : public QAbstractTableModel { SymbolTableView* m_parent; std::string m_filter; - std::vector m_symbols; + std::vector m_preparedSymbols {}; + // the symbols we actually use. + std::vector m_modelSymbols {}; public: explicit SymbolTableModel(SymbolTableView* parent); @@ -25,7 +27,7 @@ public: QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; - void updateSymbols(); + void updateSymbols(std::vector&& symbols); void setFilter(std::string text); @@ -38,9 +40,6 @@ class SymbolTableView : public QTableView, public FilterTarget Q_OBJECT friend class SymbolTableModel; - // TODO: Both the model and the view store the symbols? - std::vector m_symbols; - SymbolTableModel* m_model; public: -- cgit v1.3.1