View Issue Details

IDProjectCategoryView StatusLast Update
0023086CommunityOCCT:Application Frameworkpublic2012-11-16 13:17
ReporterszyAssigned Toszy 
PrioritynormalSeveritymajor 
Status closedResolutionfixed 
Product Version6.5.2 
Target Version6.5.4Fixed in Version6.5.4 
Summary0023086: OCC 6.5.2 DNaming bug
DescriptionPost 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."
TagsNo tags attached.
Test case numberNot needed

Relationships

has duplicate 0023355 closedbugmaster Community Pointer to local variable 'TNaming_Builder' is stored outside the scope of this variable. Such a pointer will become invalid. 
related to 0021977 closedszy Open CASCADE Unsafe implementation of TNaming_Builder 

Activities

szy

2012-04-11 19:47

manager   ~0020340

Fixed in branch CR23086.
Review, please.

abv

2012-04-11 19:52

manager   ~0020341

Please provide meaningful description of the change made

vro

2012-04-12 10:24

developer   ~0020349

The changes are Ok.

szy

2012-04-12 10:27

manager   ~0020350

Last edited: 2012-08-17 17:25

Technical solution: static TNaming_Buildrer is replaced by corresponding pair [new, delete]. Dynamic management of the Builder creation/deletion is added.

mkv

2012-04-13 14:50

tester   ~0020383

Dear BugMaster,
Workbench KAS:dev:apn-23086-occt was created from git branch CR23086
(and apn-23086-products from svn trunk) and compiled on Linux platform.

There are not regressions in apn-23086-products regarding to KAS:dev:products-20120406-opt
There are not improvements in apn-23086-products regarding to KAS:dev:products-20120406-opt

See results in /QADisk/occttests/results/KAS/dev/apn-23086-products_12042012/lin
See reference results in /QADisk/occttests/results/KAS/dev/products-20120406-opt_07042012/lin
See test cases in /QADisk/occttests/tests/ED
N.B. In order to launch testing case you can make use the following instructions
http://doc/doku.php?id=occt:certification

abv

2012-09-07 09:51

manager   ~0021427

The alternative implementation of the fix (using Handles instead of plain C pointers) is integrated to the same-name branch CR23086; please review

szy

2012-09-07 14:19

manager   ~0021433

Reviewed. It's Ok.

apn

2012-09-13 14:56

administrator   ~0021477

Dear BugMaster,
Branch CR23086 (and products from GIT master) was compiled on Linux and Windows platforms and tested.

Regression:
Not detected

Improvements:
Not detected

Testing case:
Not needed

Related Changesets

occt: master d4832c3e

2012-09-14 12:36:12

szy

Details Diff
0023086: OCC 6.5.2 DNaming bug

The code is corrected to create instances of TNaming_Builder class dynamically. Note that they cannot be created as local variables as they should be instantiated only when needed and then reused for the subshapes of the same type in cycle.
Code around is cleaned from tabs and duplicated fragments.
Affected Issues
0023086
mod - src/DNaming/DNaming_TransformationDriver.cxx Diff File

Issue History

Date Modified Username Field Change
2012-04-06 15:45 szy New Issue
2012-04-06 15:45 szy Assigned To => szy
2012-04-11 19:47 szy Note Added: 0020340
2012-04-11 19:47 szy Assigned To szy => vro
2012-04-11 19:47 szy Status new => resolved
2012-04-11 19:52 abv Note Added: 0020341
2012-04-12 10:24 vro Note Added: 0020349
2012-04-12 10:24 vro Assigned To vro => mkv
2012-04-12 10:24 vro Status resolved => reviewed
2012-04-12 10:27 szy Note Added: 0020350
2012-04-12 11:02 szy Target Version 6.5.4 => 6.5.3
2012-04-12 11:02 apn Assigned To mkv => apn
2012-04-12 11:02 apn Description Updated
2012-04-12 11:54 mkv Test case number => Not needed
2012-04-13 14:50 mkv Note Added: 0020383
2012-04-13 14:50 mkv Assigned To apn => bugmaster
2012-04-13 14:50 mkv Status reviewed => tested
2012-04-26 18:47 abv Target Version 6.5.3 => 6.5.4
2012-04-26 18:47 abv Assigned To bugmaster => abv
2012-04-26 18:47 abv Status tested => feedback
2012-08-17 16:55 abv Relationship added has duplicate 0023355
2012-08-17 17:25 szy Note Edited: 0020350
2012-09-07 09:34 abv Relationship added related to 0021977
2012-09-07 09:51 abv Note Added: 0021427
2012-09-07 09:51 abv Assigned To abv => szy
2012-09-07 09:51 abv Status feedback => resolved
2012-09-07 14:19 szy Note Added: 0021433
2012-09-07 14:19 szy Status resolved => reviewed
2012-09-07 16:00 szy Assigned To szy => mkv
2012-09-13 14:56 apn Note Added: 0021477
2012-09-13 14:56 apn Assigned To mkv => bugmaster
2012-09-13 14:56 apn Status reviewed => tested
2012-09-17 17:29 szy Changeset attached => occt master d4832c3e
2012-09-17 17:34 szy Assigned To bugmaster => szy
2012-09-17 17:34 szy Status tested => verified
2012-09-17 17:34 szy Resolution open => fixed
2012-11-16 13:14 bugmaster Fixed in Version => 6.5.4
2012-11-16 13:17 bugmaster Status verified => closed