You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The destruction of objects with Matchers and SystemCClang should be revisited. It seems that the destruction of dynamically objects are not done properly.
The text was updated successfully, but these errors were encountered:
The current design creates an incomplete ModuleDecl in Matchers. The ports are populated there. Then, for each instance that is recognized, a new ModuleDecl is created, and information from the incomplete ModuleDecl is copied into the new instance-specific ModuleDecl. When deleting an instance of ModuleDecl, we have to be careful. This is because we do not want to delete the instance-specific ModuleDecl, which has structures with pointers in it (PortDecl), and then delete the incomplete ModuleDecl because the latter will cause a double free memory error. This is because the deletion of the instance-specific ModuleDecl will free the objects identified in the incomplete ModuleDecl.
The current solution is to clear the information for the instance-specific ModuleDecl before deleting it. Then, the deletion of the incomplete ModuleDecl will free the other objects such as PortDecl. clearOnlyGlobal does exactly this.
Description
The destruction of objects with
Matchers
andSystemCClang
should be revisited. It seems that the destruction of dynamically objects are not done properly.The text was updated successfully, but these errors were encountered: