From 418a8dc7a933eac33fede5ac2681e055ea0a23f8 Mon Sep 17 00:00:00 2001 From: Niklas Eiling Date: Mon, 30 Jan 2023 16:02:13 +0100 Subject: [PATCH] fix segfault in card because vfioContainer was shadowed in PcieCard Signed-off-by: Niklas Eiling --- fpga/include/villas/fpga/card.hpp | 15 ++++----------- fpga/include/villas/fpga/pcie_card.hpp | 3 --- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/fpga/include/villas/fpga/card.hpp b/fpga/include/villas/fpga/card.hpp index eb903e765..3ad51e3fa 100644 --- a/fpga/include/villas/fpga/card.hpp +++ b/fpga/include/villas/fpga/card.hpp @@ -42,21 +42,14 @@ public: bool mapMemoryBlock(const MemoryBlock &block); bool unmapMemoryBlock(const MemoryBlock &block); - -private: - // Cache a set of already mapped memory blocks - std::set memoryBlocksMapped; - - std::shared_ptr vfioContainer; + std::shared_ptr vfioContainer; protected: - // Logger getLogger() const - // { - // return villas::logging.get(name); - // } + // Cache a set of already mapped memory blocks + std::set memoryBlocksMapped; Logger logger; }; } /* namespace fpga */ -} /* namespace villas */ \ No newline at end of file +} /* namespace villas */ diff --git a/fpga/include/villas/fpga/pcie_card.hpp b/fpga/include/villas/fpga/pcie_card.hpp index 6e3da0b85..f7c16c805 100644 --- a/fpga/include/villas/fpga/pcie_card.hpp +++ b/fpga/include/villas/fpga/pcie_card.hpp @@ -83,9 +83,6 @@ public: // TODO: make this private std::shared_ptr pdev; // PCI device handle - // The VFIO container that this card is part of - std::shared_ptr vfioContainer; - // Slave address space ID to access the PCIe address space from the FPGA MemoryManager::AddressSpaceId addrSpaceIdDeviceToHost;