Skip to content
Snippets Groups Projects
Commit 842a7e3d authored by Joris van Zwieten's avatar Joris van Zwieten
Browse files

BugID: 905

- There turned out to be situation where calling decrNParents() in the destuctor of MeqExprRep on its children
  would result in an invalid read. For instance, MeqLMN has two MeqExpr attributes itsRa, itsDec. When a MeqLMN
  node is destructed, these attributes are deleted and then the destructor of the base class MeqExprRep is called.
  Now if deleted of itsRa, itsDec brings their reference count to zero, these nodes are destructed and the subsequent
  call to decrNParents from the destructor of MeqExprRep called by the destructor of MeqLMN results in an invalid
  read. The reason that a MeqExprRep can still have a link to a child that has already been destructed is that its
  child vector consists of MeqExprRep* instead of the reference counted MeqExpr. In other words, MeqExprRep::addChild()
  does not result in an increment of the reference count. This was fixed by replacing the child vector with a vector
  of MeqExpr.
parent 9c5f06ad
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment