View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0024534 | Open CASCADE | OCCT:Visualization | public | 2014-01-16 11:22 | 2014-11-11 12:51 |
Reporter | Assigned To | ||||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Platform | Linux | OS | Debian 4.0 | ||
Product Version | 6.7.0 | ||||
Target Version | 6.8.0 | Fixed in Version | 6.8.0 | ||
Summary | 0024534: Improve design of Image_PixMap class | ||||
Description | This issue is highlighed by GCC compiler warning on breakage of C strict aliasing rules in type conversion, see 0024252: Image_PixMap.hxx:247: warning: dereferencing type-punned pointer will break strict-aliasing rules The actual problem seems to be poor design of Image_PixMap class: it has a field of the type Image_PixMapData<Standard_Byte> but provides a means to address it as if it had different type (via its methods EditData(), ReadData(), Value()). This is obviously incorrect. One possibility to fix it could be providing method to convert between Image_PixMapData<> classes with different template argument, and make correct instance when needed (possibly creating several instances sharing the same buffer). | ||||
Tags | No tags attached. | ||||
Test case number | Not needed | ||||
|
Patch for OCCT and Products is ready for review in branch CR24534_1 (based on CR24405). |
|
Branch CR24534_1 reviewed in occt and occt-products without remarks, ready for testing. |
|
Dear BugMaster, OCCT and Products branch CR24534_1 was compiled on Linux and Windows platforms and tested. SHA-1: b97dd89f9e256987a5de3175b7aa04cda087ed16 Number of compiler warnings: occt component : Linux: 24 (27 on master) - 3 warnings in inc/Image_PixMap.hxx were removed Windows: 0 (0 on master) products component : Linux: 12 (12 on master) Windows: 2 (2 on master) Regressions/Differences: No regressions/differences Testing cases: Not needed Testing on Linux: Total MEMORY difference: 395027512 / 350990000 Total CPU difference: 58587.06999999985 / 50414.12000000013 Testing on Windows: Total MEMORY difference: 437939848 / 380569632 Total CPU difference: 35148.125 / 36389.671875 There are no differences in images found by testdiff. |
occt: master ca0c0b11 2014-04-04 05:15:40
Committer: abv Details Diff |
0024534: Improve design of Image_PixMap class Remove template methods Image_PixMap::EditData(), ::ReadData(). Add template method Image_PixMap::ChangeValue(). Remove redundant parameter for Image_PixMap::Clear() method. Make Image_PixMapData non-template class. Introduce NCollection_Buffer. |
Affected Issues 0024534 |
|
mod - src/Image/Image_AlienPixMap.cxx | Diff File | ||
mod - src/Image/Image_AlienPixMap.hxx | Diff File | ||
mod - src/Image/Image_Diff.cxx | Diff File | ||
mod - src/Image/Image_PixMap.cxx | Diff File | ||
mod - src/Image/Image_PixMap.hxx | Diff File | ||
mod - src/Image/Image_PixMapData.hxx | Diff File | ||
mod - src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx | Diff File | ||
mod - src/NCollection/FILES | Diff File | ||
add - src/NCollection/NCollection_Buffer.hxx | Diff File | ||
mod - src/OpenGl/OpenGl_AspectMarker.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_View_2.cxx | Diff File | ||
mod - src/QABugs/QABugs_19.cxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-01-16 11:22 |
|
New Issue | |
2014-01-16 11:22 |
|
Assigned To | => san |
2014-01-16 11:25 |
|
Relationship added | child of 0024252 |
2014-01-16 11:36 |
|
Product Version | => 6.7.0 |
2014-01-16 11:36 |
|
Target Version | => 6.7.1 |
2014-02-05 12:45 |
|
Assigned To | san => kgv |
2014-02-05 12:45 |
|
Status | new => assigned |
2014-03-29 18:52 | kgv | Relationship added | related to 0024406 |
2014-03-29 18:53 | kgv | Relationship added | related to 0024405 |
2014-04-03 12:27 | kgv | Note Added: 0028650 | |
2014-04-03 12:27 | kgv | Assigned To | kgv => san |
2014-04-03 12:27 | kgv | Status | assigned => resolved |
2014-04-03 12:27 | kgv | Summary | Poor design of Image_PixMap class => Improve design of Image_PixMap class |
2014-04-04 09:21 |
|
Note Added: 0028670 | |
2014-04-04 09:21 |
|
Assigned To | san => bugmaster |
2014-04-04 09:21 |
|
Status | resolved => reviewed |
2014-04-04 09:22 |
|
Note Edited: 0028670 | |
2014-04-04 16:26 |
|
Target Version | 6.7.1 => 6.8.0 |
2014-04-04 17:55 |
|
Assigned To | bugmaster => apn |
2014-04-08 15:46 | apn | Note Added: 0028743 | |
2014-04-08 15:48 | apn | Test case number | => Not needed |
2014-04-08 15:48 | apn | Assigned To | apn => bugmaster |
2014-04-08 15:48 | apn | Status | reviewed => tested |
2014-04-11 14:43 |
|
Changeset attached | => occt master ca0c0b11 |
2014-04-11 14:43 |
|
Assigned To | bugmaster => abv |
2014-04-11 14:43 |
|
Status | tested => verified |
2014-04-11 14:43 |
|
Resolution | open => fixed |
2014-11-11 12:47 |
|
Fixed in Version | => 6.8.0 |
2014-11-11 12:51 |
|
Status | verified => closed |