View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0026348 | Community | OCCT:Visualization | public | 2015-06-17 12:46 | 2016-04-20 15:50 |
Reporter | Assigned To | bugmaster | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Target Version | 7.0.0 | Fixed in Version | 7.0.0 | ||
Summary | 0026348: Visualization, TKOpenGl - eliminate invalid NULL checks for transformation matrix | ||||
Description | The issue has been reported in OCE mailing list: in three places in OpenGl_View_Raytrace.cxx, array is compared against NULL, which should be always false: OpenGl_View_Raytrace.cxx: if (theStructure->Transformation()->mat != NULL) OpenGl_View_Raytrace.cxx: theStructure->Transformation()->mat ? aStructTransform : NULL, theGlContext); OpenGl_View_Raytrace.cxx: theStructure->Transformation()->mat ? aStructTransform : NULL, theGlContext); Here mat is a field (array) of the class OpenGl_Matrix, hence compiler (CLang) can assume it is always non-null. It is likely that result of Transformation() should be compared against NULL instead (i.e. just remove "->mat"), to be checked. | ||||
Steps To Reproduce | Compile with CLang (?) | ||||
Tags | No tags attached. | ||||
Test case number | Not needed | ||||
|
Branch CR26348 has been created by kgv. SHA-1: 8b6da609f6c03747af0ac90d5296cbf5d6b866c6 Detailed log of new commits: Author: osa Date: Mon Nov 23 12:34:50 2015 +0300 0026348: Visualization, TKOpenGl - eliminate invalid NULL checks for transformation matrix Graphic3d_CStructure::Transformation - use Graphic3d_Mat4 instead of plain arrays. Drop duplicating field OpenGl_Structure::myTransformation (copy of Graphic3d_CStructure::Transformation). Drop unused property Graphic3d_CStructure::Composition and Graphic3d_Structure::Composition(). |
|
Please test the patch. |
|
Dear BugMaster, Branch CR26348 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested. SHA-1: 8b6da609f6c03747af0ac90d5296cbf5d6b866c6 Number of compiler warnings: occt component: Linux: 1 (0 on master) Windows: 0 (0 on master) MacOS: 128 (127 on master) products component: Linux: 39 (39 on master) Windows: 0 (0 on master) There is new additional warnings on Linux and MacOS: Graphic3d_Structure.cxx:1561, GNU C Compiler 4 (gcc), Priority: Normal suggest parentheses around '&&' within '||' [-Wparentheses] Regressions/Differences: Not detected Testing cases: Not needed Testing on Linux: Total MEMORY difference: 92891480 / 93581960 [-0.74%] Total CPU difference: 19956.579999999853 / 19980.499999999956 [-0.12%] Testing on Windows: Total MEMORY difference: 58363630 / 58376964 [-0.02%] Total CPU difference: 18159.655207298943 / 18194.31862949887 [-0.19%] |
|
Dear kgv, Branch CR26348 has been rejected due to: - additional warnings |
|
Branch CR26348 has been updated by kgv. SHA-1: 77812acade38cb382815035eb2a99e5df033e824 Detailed log of new commits: Author: kgv Date: Tue Nov 24 15:24:34 2015 +0300 eliminate new compiler warning |
|
Branch CR26348_1 has been created by kgv. SHA-1: ee4b1cbdbf62ef98eb12b74a10b9c320ab585d71 Detailed log of new commits: Author: osa Date: Tue Nov 24 15:26:34 2015 +0300 0026348: Visualization, TKOpenGl - eliminate invalid NULL checks for transformation matrix Graphic3d_CStructure::Transformation - use Graphic3d_Mat4 instead of plain arrays. Drop duplicating field OpenGl_Structure::myTransformation (copy of Graphic3d_CStructure::Transformation). Drop unused property Graphic3d_CStructure::Composition and Graphic3d_Structure::Composition(). |
|
Please check compilation of updated patch in branch CR26348_1, regression testing is not needed. |
|
Branch CR26348_1 has been updated forcibly by apv. SHA-1: 67ac1edd913e5fa29fa9c5c898243ff99a96cbaa |
|
Branch CR26348_1 has been rebased on the current master |
|
Dear BugMaster, Branch CR26348_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms. SHA-1: 67ac1edd913e5fa29fa9c5c898243ff99a96cbaa Number of compiler warnings: occt component: Linux: 0 (0 on master) Windows: 0 (0 on master) MacOS: 134 (134 on master) products component: Linux: 39 (39 on master) Windows: 0 (0 on master) |
|
Branch CR26348 has been deleted by kgv. SHA-1: 77812acade38cb382815035eb2a99e5df033e824 |
|
Branch CR26348_1 has been deleted by kgv. SHA-1: 67ac1edd913e5fa29fa9c5c898243ff99a96cbaa |
occt: master 6bd94e0d 2015-11-24 12:26:34
Committer: bugmaster Details Diff |
0026348: Visualization, TKOpenGl - eliminate invalid NULL checks for transformation matrix Graphic3d_CStructure::Transformation - use Graphic3d_Mat4 instead of plain arrays. Drop duplicating field OpenGl_Structure::myTransformation (copy of Graphic3d_CStructure::Transformation). Drop unused property Graphic3d_CStructure::Composition and Graphic3d_Structure::Composition(). |
Affected Issues 0026348 |
|
mod - src/Graphic3d/Graphic3d_CStructure.cxx | Diff File | ||
mod - src/Graphic3d/Graphic3d_CStructure.hxx | Diff File | ||
mod - src/Graphic3d/Graphic3d_Structure.cxx | Diff File | ||
mod - src/Graphic3d/Graphic3d_Structure.hxx | Diff File | ||
mod - src/OpenGl/FILES | Diff File | ||
rm - src/OpenGl/OpenGl_Matrix.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_Matrix.hxx | Diff File | ||
mod - src/OpenGl/OpenGl_Structure.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_Structure.hxx | Diff File | ||
mod - src/OpenGl/OpenGl_StructureShadow.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_View.hxx | Diff File | ||
mod - src/OpenGl/OpenGl_View_Raytrace.cxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-06-17 12:46 |
|
New Issue | |
2015-06-17 12:46 |
|
Assigned To | => kgv |
2015-11-17 16:08 | kgv | Target Version | 7.0.0 => 7.1.0 |
2015-11-23 10:05 | kgv | Status | new => assigned |
2015-11-23 10:05 | kgv | Target Version | 7.1.0 => 7.0.0 |
2015-11-23 10:05 | kgv | Summary | Incorrect comparisons in OpenGl_View_Raytrace.cxx => Visualization, TKOpenGl - eliminate invalid NULL checks for transformation matrix |
2015-11-23 12:35 | git | Note Added: 0048466 | |
2015-11-23 12:35 | kgv | Note Added: 0048467 | |
2015-11-23 12:35 | kgv | Assigned To | kgv => bugmaster |
2015-11-23 12:35 | kgv | Status | assigned => resolved |
2015-11-23 12:35 | kgv | Status | resolved => reviewed |
2015-11-23 15:58 |
|
Assigned To | bugmaster => apv |
2015-11-24 15:11 |
|
Test case number | => Not needed |
2015-11-24 15:14 |
|
Note Added: 0048518 | |
2015-11-24 15:14 |
|
Assigned To | apv => kgv |
2015-11-24 15:14 |
|
Status | reviewed => assigned |
2015-11-24 15:15 |
|
Note Added: 0048519 | |
2015-11-24 15:24 | git | Note Added: 0048521 | |
2015-11-24 15:27 | git | Note Added: 0048523 | |
2015-11-24 15:28 | kgv | Note Added: 0048524 | |
2015-11-24 15:28 | kgv | Assigned To | kgv => bugmaster |
2015-11-24 15:28 | kgv | Status | assigned => resolved |
2015-11-24 15:28 | kgv | Status | resolved => reviewed |
2015-11-24 16:59 |
|
Assigned To | bugmaster => apv |
2015-11-24 17:11 | git | Note Added: 0048534 | |
2015-11-24 17:12 |
|
Note Added: 0048535 | |
2015-11-25 14:25 |
|
Note Added: 0048564 | |
2015-11-25 14:25 |
|
Assigned To | apv => bugmaster |
2015-11-25 14:25 |
|
Status | reviewed => tested |
2015-11-27 12:21 | bugmaster | Changeset attached | => occt master 6bd94e0d |
2015-11-27 12:21 | bugmaster | Status | tested => verified |
2015-11-27 12:21 | bugmaster | Resolution | open => fixed |
2016-04-17 14:07 | git | Note Added: 0053048 | |
2016-04-17 14:07 | git | Note Added: 0053049 | |
2016-04-20 15:42 |
|
Fixed in Version | => 7.0.0 |
2016-04-20 15:50 |
|
Status | verified => closed |