dev: Remove unused system pointer in the Platform base class
authorAndreas Sandberg <Andreas.Sandberg@ARM.com>
Wed, 11 Feb 2015 15:23:22 +0000 (10:23 -0500)
committerAndreas Sandberg <Andreas.Sandberg@ARM.com>
Wed, 11 Feb 2015 15:23:22 +0000 (10:23 -0500)
The Platform base class contains a pointer to an instance of the
System which is never initialized. This can lead to subtle bugs since
some architecture-specific platform implementations contain their own
system pointer which is normally used. However, if the platform is
accessed through a pointer to its base class, the dangling pointer
will be used instead.

src/dev/platform.hh

index b3d1bec9fec008eaca9ac93e9228884d89998484..0931d9ecea5234c04dd782ee802bbb661336f300 100644 (file)
@@ -55,9 +55,6 @@ class Platform : public SimObject
     /** Pointer to the interrupt controller */
     IntrControl *intrctrl;
 
-    /** Pointer to the system for info about the memory system. */
-    System *system;
-
   public:
     typedef PlatformParams Params;
     Platform(const Params *p);