OCC 6.5.2 DNaming bug


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.



Forum supervisor's picture

Dear Valeriu,
I suggest you to register the issue in Mantis Bugtracker which is available now via the Collaborative portal - http://dev.opencascade.org/index.php?q=home/get_involved.