MantisBT - Open CASCADE |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0024534 | Open CASCADE | [OCCT] OCCT:Visualization | public | 2014-01-16 11:22 | 2014-11-11 12:51 |
|
Reporter | abv | |
Assigned To | abv | |
Priority | normal | Severity | minor | |
Status | closed | Resolution | fixed | |
Platform | Linux | OS | Debian 4.0 | OS Version | 64 bit |
Product Version | [OCCT] 6.7.0 | |
Target Version | [OCCT] 6.8.0 | Fixed in Version | [OCCT] 6.8.0 | |
Test case number | Not needed |
|
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). |
Steps To Reproduce | |
Additional information and documentation updates | |
Tags | No tags attached. |
Relationships | related to | 0024406 | closed | apn | Visualization - crash on re-usage of the same primitive array | related to | 0024405 | closed | apn | TKernel - add aligned allocator class NCollection_AlignedAllocator | child of | 0024252 | closed | bugmaster | GCC warnings on breakage of strict-aliasing rules |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2014-01-16 11:22 | abv | New Issue | |
2014-01-16 11:22 | abv | Assigned To | => san |
2014-01-16 11:25 | abv | Relationship added | child of 0024252 |
2014-01-16 11:36 | abv | Product Version | => 6.7.0 |
2014-01-16 11:36 | abv | Target Version | => 6.7.1 |
2014-02-05 12:45 | san | Assigned To | san => kgv |
2014-02-05 12:45 | san | 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 | san | Note Added: 0028670 | |
2014-04-04 09:21 | san | Assigned To | san => bugmaster |
2014-04-04 09:21 | san | Status | resolved => reviewed |
2014-04-04 09:22 | san | Note Edited: 0028670 | bug_revision_view_page.php?bugnote_id=28670#r7142 |
2014-04-04 16:26 | abv | Target Version | 6.7.1 => 6.8.0 |
2014-04-04 17:55 | mkv | 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 | abv | Changeset attached | => occt master ca0c0b11 |
2014-04-11 14:43 | abv | Assigned To | bugmaster => abv |
2014-04-11 14:43 | abv | Status | tested => verified |
2014-04-11 14:43 | abv | Resolution | open => fixed |
2014-11-11 12:47 | aiv | Fixed in Version | => 6.8.0 |
2014-11-11 12:51 | aiv | Status | verified => closed |