View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0024252 | Open CASCADE | OCCT:Coding | public | 2013-10-11 09:35 | 2017-01-23 12:02 |
Reporter | Assigned To | bugmaster | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Platform | Linux | ||||
Product Version | 6.7.0 | ||||
Target Version | 6.7.1 | Fixed in Version | 6.7.1 | ||
Summary | 0024252: GCC warnings on breakage of strict-aliasing rules | ||||
Description | When building OCCT on Linux platforms, GCC reports multiple warnings on breakage of strict-aliasing rules (about 100 cases in total), for instance: NCollection_DataMap.hxx:175: dereferencing type-punned pointer will break strict-aliasing rules TopoDS_Shape.hxx:54: dereferencing pointer āEā does break strict-aliasing rules | ||||
Steps To Reproduce | See http://jenkins-merge:8080/view/A_dashboard_sse2_master/job/inv_OCCT_master_Products_master_OCCT_Debian60-64_compile/1/warnings13Result/? | ||||
Tags | No tags attached. | ||||
Test case number | Not needed | ||||
parent of | 0024489 | closed | bugmaster | Open CASCADE | Avoid type casts in call to Standard::Free() |
parent of | 0024534 | closed | Open CASCADE | Improve design of Image_PixMap class | |
parent of | 0024536 | closed | bugmaster | Open CASCADE | GCC compiler warning on breakage of pointer aliasing rules in BRepFill_Evolved.cxx |
parent of | 0024535 | closed | bugmaster | Open CASCADE | Bad type cast in TDocStd_Document::Update() |
parent of | 0024537 | closed | kgv | Open CASCADE | GCC compiler warnings in byte order reversion code |
|
The branch CR24252 is created. Violation of strict aliasing rules can lead to undefined behaviour when optimization mode is -O2 or higher. One of possible solutions is usage of union to reference to an object using different types. Please read http://www.cyberforum.ru/c/thread802307.html http://dbp-consulting.com/tutorials/StrictAliasing.html http://cellperformance.beyond3d.com/articles/2006/06/understanding-strict-aliasing.html |
|
The patch is reviewed; the part which consists in elimination of unnecessary type casts is pushed to branch CR24252_extract; please test. Other remaining problems will be registered as separate issues. |
|
Dear BugMaster, Branch CR24252_extract (and products from GIT master) was compiled on Linux and Windows platforms and tested. SHA-1: 7f80d976ee40adb74229282e595b5761b94a7876 Number of compiler warnings: occt component : Linux: 38 (55 on master) Windows: 1 (1 on master) products component : Linux: 12 (20 on master) Windows: 2 (2 on master) Regressions/Differences: No regressions/differences Testing cases: Not needed Testing on Linux: Total MEMORY difference: 358283328 / 357072508 Total CPU difference: 44045.470000000154 / 42990.139999999854 Testing on Windows: Total MEMORY difference: 409959504 / 412885964 Total CPU difference: 29722.703125 / 31989.96875 There are not differences in images found by testdiff. |
occt: master fd03ee4b 2014-01-15 02:40:18
Committer: bugmaster Details Diff |
0024252: GCC warnings on breakage of strict-aliasing rules Fixed type casts in NCollection maps Avoid invalid type cast in handling of LDOM text object Use correct pointer type in callback function of Graphic3d_CGraduatedTrihedron class Format of printf() simplified in IntPatch_Point.cxx |
Affected Issues 0024252 |
|
mod - src/Graphic3d/Graphic3d_CGraduatedTrihedron.hxx | Diff File | ||
mod - src/IntPatch/IntPatch_Point.cxx | Diff File | ||
mod - src/NCollection/NCollection_DataMap.hxx | Diff File | ||
mod - src/NCollection/NCollection_DoubleMap.hxx | Diff File | ||
mod - src/NCollection/NCollection_IndexedDataMap.hxx | Diff File | ||
mod - src/NCollection/NCollection_IndexedMap.hxx | Diff File | ||
mod - src/NCollection/NCollection_Map.hxx | Diff File | ||
mod - src/OpenGl/OpenGl_GraduatedTrihedron.hxx | Diff File | ||
mod - src/Visual3d/Visual3d_View.cxx | Diff File | ||
mod - src/XmlMNaming/XmlMNaming_NamedShapeDriver.cxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-10-11 09:35 |
|
New Issue | |
2013-10-11 09:35 |
|
Assigned To | => bugmaster |
2013-10-11 09:36 |
|
Assigned To | bugmaster => rkv |
2013-10-11 09:36 |
|
Status | new => assigned |
2013-10-21 10:31 |
|
Assigned To | rkv => abv |
2013-10-21 10:38 |
|
Note Added: 0026153 | |
2013-12-21 11:13 |
|
Relationship added | parent of 0024489 |
2014-01-11 11:58 |
|
Category | OCCT Release:BUILD => OCCT:Coding |
2014-01-16 10:36 |
|
Status | assigned => resolved |
2014-01-16 10:41 |
|
Note Added: 0027512 | |
2014-01-16 10:41 |
|
Assigned To | abv => bugmaster |
2014-01-16 10:41 |
|
Status | resolved => reviewed |
2014-01-16 10:52 | kgv | Platform | => Linux |
2014-01-16 10:52 | kgv | Product Version | => 6.7.0 |
2014-01-16 10:52 | kgv | Target Version | => 6.7.1 |
2014-01-16 11:25 |
|
Relationship added | parent of 0024534 |
2014-01-16 11:51 |
|
Assigned To | bugmaster => mkv |
2014-01-16 11:58 |
|
Relationship added | parent of 0024536 |
2014-01-16 11:59 |
|
Relationship added | parent of 0024535 |
2014-01-16 13:04 |
|
Relationship added | parent of 0024537 |
2014-01-16 15:21 |
|
Note Added: 0027522 | |
2014-01-16 15:22 |
|
Test case number | => Not needed |
2014-01-16 15:22 |
|
Assigned To | mkv => bugmaster |
2014-01-16 15:22 |
|
Status | reviewed => tested |
2014-01-21 11:22 | bugmaster | Changeset attached | => occt master fd03ee4b |
2014-01-21 11:22 | bugmaster | Status | tested => verified |
2014-01-21 11:22 | bugmaster | Resolution | open => fixed |
2014-05-05 13:36 |
|
Status | verified => closed |
2014-05-05 13:37 |
|
Fixed in Version | => 6.7.1 |