|Anonymous | Login||2020-12-05 03:19 MSK|
|My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0024535||Open CASCADE||[OCCT] OCCT:Application Framework||public||2014-01-16 11:36||2014-05-05 13:39|
|Product Version||[OCCT] 6.7.0|
|Target Version||[OCCT] 6.7.1||Fixed in Version||[OCCT] 6.7.1|
|Summary||0024535: Bad type cast in TDocStd_Document::Update()|
|Description||This issue is reported by GCC compiler warning on breakage of C pointer aliasing rules, see 0024252:|
TDocStd_Document.cxx:227: warning: dereferencing type-punned pointer will break strict-aliasing rules
In this method the address (!) of the input variable aModifContext is casted to pointer to class, then the value of that variable is copied to local variable as if it were that class. This is clearly incorrect.
Note that this method seems to be never called by OCCT (called only by CDM_Document::UpdateFromDocuments() which in turn is not referred from anywhere) and thus probably can be removed.
If it is still needed, then I suppose that the value of argument variable (and not its value) should be casted to pointer of the relevant class (TDocStd_Context).
|Tags||No tags attached.|
|Test case number||Not needed|
Fixed in branch CR24535.
To be reviewed.
|No remarks, please test|
Branch CR24535 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
Number of compiler warnings:
occt component :
Linux: 27 (29 on master)
Windows: 0 (0 on master)
products component :
Linux: 12 (12 on master)
Windows: 2 (2 on master)
Testing on Linux:
Total MEMORY difference: 391188912 / 391531872
Total CPU difference: 75461.26999999965 / 51359.449999999655
Testing on Windows:
Total MEMORY difference: 434537344 / 434230736
Total CPU difference: 38522.140625 / 35761.59375
There are no differences in images found by testdiff.
occt: master 2cb0e213
Timestamp: 2014-03-26 12:49:44
|0024535: Bad type cast in TDocStd_Document::Update()
Eliminating of GCC compiler warning on breakage of C pointer aliasing rules.
|mod - src/TDocStd/TDocStd_Document.cxx|
|2014-01-16 11:36||abv||New Issue|
|2014-01-16 11:36||abv||Assigned To||=> szy|
|2014-01-16 11:59||abv||Relationship added||child of 0024252|
|2014-03-26 16:37||szy||Status||new => assigned|
|2014-03-26 16:51||szy||Note Added: 0028495|
|2014-03-26 16:51||szy||Assigned To||szy => abv|
|2014-03-26 16:51||szy||Status||assigned => resolved|
|2014-03-26 17:21||abv||Note Added: 0028497|
|2014-03-26 17:21||abv||Assigned To||abv => bugmaster|
|2014-03-26 17:21||abv||Status||resolved => reviewed|
|2014-03-26 17:47||mkv||Assigned To||bugmaster => mkv|
|2014-03-27 14:34||mkv||Note Added: 0028511|
|2014-03-27 14:35||mkv||Test case number||=> Not needed|
|2014-03-27 14:35||mkv||Assigned To||mkv => bugmaster|
|2014-03-27 14:35||mkv||Status||reviewed => tested|
|2014-03-28 16:38||bugmaster||Changeset attached||=> occt master 2cb0e213|
|2014-03-28 16:38||bugmaster||Status||tested => verified|
|2014-03-28 16:38||bugmaster||Resolution||open => fixed|
|2014-05-05 13:33||aiv||Status||verified => closed|
|2014-05-05 13:39||aiv||Fixed in Version||=> 6.7.1|
|Copyright © 2000 - 2020 MantisBT Team|