Archived issue #0027426
FSD_BinaryFile: Assignment to a temporary handle variable
Description
The line 689 of the current version of the file FSD_BinaryFile.cxx looks like this:
iData->ReadArray() = new Storage_HPArray(1, theData->NumberOfObjects());
But the method ReadArray() of the class Storage_InternalData returns handle by value. So, this assignment will no take any effect, and the logic of the code becomes ill.
This code was integrated with the fix to the bug #26229.
iData->ReadArray() = new Storage_HPArray(1, theData->NumberOfObjects());
But the method ReadArray() of the class Storage_InternalData returns handle by value. So, this assignment will no take any effect, and the logic of the code becomes ill.
This code was integrated with the fix to the bug #26229.
Steps to reproduce
Dear MPV, could you review please: http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR27426-master-VRO/view/COMPARE/
Public activity
7 archived notes
Participants are labeled by their role within this record.
This code seems to be dead: apart of apparent bug in initialization of a field, another problem is that this field (Storage_InternalData::myReadArray, accessed by method ReadArray()) is nowhere used outside of FSD_BinaryFile::ReadCompleteInfo(), and there is no known test cases when that code using it is activated... This is to be investigated further.
I'm assigning this ticket to you Sergey because ibs is no longer in the company. I don't even know who is it :)
Branch [archived branch] has been created by Commenter 4.
[revision removed]
Detailed log of new commits:
Author: Vlad Romashko
Date: Mon Dec 14 13:18:27 2020 +0300
0027426: FSD_BinaryFile: Assignment to a temporary handle variable
A reference is added to the returning object of the method Storage_InternalData::ReadArray().
Modified files:
- Storage_InternalData.hxx
OCCT: CR27426
Products: nothing
[revision removed]
Detailed log of new commits:
Author: Vlad Romashko
Date: Mon Dec 14 13:18:27 2020 +0300
0027426: FSD_BinaryFile: Assignment to a temporary handle variable
A reference is added to the returning object of the method Storage_InternalData::ReadArray().
Modified files:
- Storage_InternalData.hxx
OCCT: CR27426
Products: nothing
Reviewed
OCCT branch: [archived branch]
Products branch: [archived branch]
OCCT branch: [archived branch]
Products branch: [archived branch]
Vlad, have you considered a comment left by Andrey, that the code seems nowhere used / not covered by any tests?
Combination -
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.
Number of compiler warnings:
No new/fixed warnings
Regressions/Differences/Improvements:
No regressions/differences
CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17709.570000000054 / 17744.450000000124 [-0.20%]
Products
Total CPU difference: 12258.480000000121 / 12330.210000000125 [-0.58%]
Windows-64-VC14:
OCCT
Total CPU difference: 19272.796875 / 19429.1875 [-0.80%]
Products
Total CPU difference: 13712.859375 / 13755.5 [-0.31%]
Image differences :
No differences that require special attention
Memory differences :
No differences that require special attention
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.
Number of compiler warnings:
No new/fixed warnings
Regressions/Differences/Improvements:
No regressions/differences
CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17709.570000000054 / 17744.450000000124 [-0.20%]
Products
Total CPU difference: 12258.480000000121 / 12330.210000000125 [-0.58%]
Windows-64-VC14:
OCCT
Total CPU difference: 19272.796875 / 19429.1875 [-0.80%]
Products
Total CPU difference: 13712.859375 / 13755.5 [-0.31%]
Image differences :
No differences that require special attention
Memory differences :
No differences that require special attention
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]