MantisBT
Mantis Bug Tracker Workflow

View Revisions: Issue #23086 All Revisions ] Back to Issue ]
Summary 0023086: OCC 6.5.2 DNaming bug
Revision 2012-04-12 11:02 by apn
Description Post from the Forum [Valeriu Catina] - http://www.opencascade.org/org/forum/thread_23075/ [^] .
"...
in package TKDCAF, module DNaming, file DNaming_TransformationDriver.cxx, function LoadNamingDS contains code similar to:

---

TNaming_Builder* pB1;

// ... irrelevant code

if(aF) {
const TDF_Label& aFLabel = theResultLabel.FindChild(FACES_TAG, Standard_True);
TNaming_Builder aFBuilder(aFLabel);
pB1 = &aFBuilder
aF = Standard_False;
}
// ... irrelevant code
pB1->Modify(anIt.Key(), newShape);

---

pB1 takes the address of a temporary (aFBuilder in our case). As aFBuilder is destroyed at the end of the if block pB1 is invalid when pB1->Modify(anIt.Key(), newShape) is reached."
Revision 2012-04-12 11:02 by apn
Description Post from the Forum [Valeriu Catina] - http://www.opencascade.org/org/forum/thread_23075/ [^] .
"...
in package TKDCAF, module DNaming, file DNaming_TransformationDriver.cxx, function LoadNamingDS contains code similar to:

---

TNaming_Builder* pB1;

// ... irrelevant code

if(aF) {
const TDF_Label& aFLabel = theResultLabel.FindChild(FACES_TAG, Standard_True);
TNaming_Builder aFBuilder(aFLabel);
pB1 = &aFBuilder;
aF = Standard_False;
}
// ... irrelevant code
pB1->Modify(anIt.Key(), newShape);

---

pB1 takes the address of a temporary (aFBuilder in our case). As aFBuilder is destroyed at the end of the if block pB1 is invalid when pB1->Modify(anIt.Key(), newShape) is reached."


Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker