View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0032672 | Community | OCCT:Coding | public | 2021-11-18 18:49 | 2023-02-03 04:56 |
Reporter | galbramc | Assigned To | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Platform | Linux | OS | Ubuntu | ||
Product Version | 7.6.0 | ||||
Target Version | 7.7.0 | Fixed in Version | 7.7.0 | ||
Summary | 0032672: Coding Rules - eliminate GCC9 compiler warnings -Warray-bounds -fsantizize=undefined | ||||
Description | src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx:735:12: warning: array subscript -3 is outside array bounds of ‘doublereal [4]’ {aka ‘double [4]’} [-Warray-bounds] 735 | uvfonc -= 3; | ~~~~~~~^~~~ src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx:6175:16: note: while referencing ‘uvpav’ 6175 | doublereal uvpav[4] /* was [2][2] */; | ^~~~~ This was compiled with g++ 9 and -fsanitize (I don't know if the -fsanitize flag matters here). | ||||
Tags | No tags attached. | ||||
Test case number | N/A | ||||
|
I see no warnings with -Wall -Wextra. What is your full compiler parameters?g++: error: unrecognized command line option ‘-fsanitize’; did you mean ‘-fsanitize=’? |
|
Sorry, I should have been more explicit with my reporting. You do need -fsantizize=undefined to get the warning. Here is the complete set of flags by compiling with "make VERBOSE=1": /usr/bin/g++-9 -DHAVE_FREETYPE -DHAVE_OPENGL_EXT -DHAVE_XLIB -DOCC_CONVERT_SIGNALS -DTKGeomBase_EXPORTS -I/usr/include/freetype2 -I/home/jenkins/util/ESP/opencascade-7.6/trunk/build_undefined_gnu9/include/opencascade -std=c++0x -fsanitize=undefined -fno-omit-frame-pointer -fuse-ld=gold -g -fexceptions -fPIC -Wall -Wextra -O3 -DNDEBUG -s -DNo_Exception -fPIC -MD -MT src/TKGeomBase/CMakeFiles/TKGeomBase.dir/__/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx.o -MF CMakeFiles/TKGeomBase.dir/__/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx.o.d -o CMakeFiles/TKGeomBase.dir/__/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx.o -c /home/jenkins/util/ESP/opencascade-7.6/trunk/src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx /home/jenkins/util/ESP/opencascade-7.6/trunk/src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx: In static member function ‘static int AdvApp2Var_ApproxF2var::mma2fnc_(integer*, integer*, integer*, doublereal*, const AdvApp2Var_EvaluatorFunc2Var&, doublereal*, integer*, integer*, doublereal*, integer*, integer*, integer*, integer*, integer*, doublereal*, integer*, doublereal*, integer*, doublereal*, doublereal*, doublereal*, doublereal*, doublereal*, doublereal*, doublereal*, integer*)’: /home/jenkins/util/ESP/opencascade-7.6/trunk/src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx:735:12: warning: array subscript -3 is outside array bounds of ‘doublereal [4]’ {aka ‘double [4]’} [-Warray-bounds] 735 | uvfonc -= 3; | ~~~~~~~^~~~ /home/jenkins/util/ESP/opencascade-7.6/trunk/src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx:6175:16: note: while referencing ‘uvpav’ 6175 | doublereal uvpav[4] /* was [2][2] */; | ^~~~~ The same warning is repeated many times. |
|
Branch CR32672 has been created by kgv. SHA-1: af2617a3e32832b19dda2c2749af5806b0c1705a Detailed log of new commits: Author: kgv Date: Sun Nov 21 23:13:41 2021 +0300 0032672: Coding Rules - eliminate GCC9 compiler warnings -Warray-bounds -fsantizize=undefined Author: knosulko Date: Thu Oct 14 20:15:02 2021 +0300 0030272: Modeling Algorithms - Incorrect work of gproject -fix TolU/V for approximation; -fix cutting tool for approximation; -add method Adaptor3d_HSurfaceTool::IsSurfG1. -add test bugs/moddata_3/bug30272 Author: kgv Date: Wed Nov 17 11:54:05 2021 +0300 0023398: Documentation, Shape Healing User's Guide - example does not compile Fixed some misprints in the documentation. Removed description of non-existing Message_TraceFile. Author: dipts Date: Sat Nov 13 13:30:39 2021 +0100 0032662: Coding - Missing header file in AIS_DataMapOfSelStat.hxx Removed obsolete header files AIS_DataMapOfSelStat.hxx and AIS_DataMapIteratorOfDataMapOfSelStat.hxx. Removed obsolete types AIS_DataMapofIntegerListOfinteractive, AIS_ClearMode, AIS_ConnectStatus, AIS_IndexedDataMapOfOwnerPrs, AIS_MapOfInteractive. Author: kgv Date: Tue Nov 2 16:23:25 2021 +0300 0032648: Visualization, TKOpenGles - support MSAA anti-aliasing within WebGL 2.0 OpenGl_FrameBuffer::Init() now creates MSAA render buffer in case if MSAA textures are unsupported. In this case OpenGl_View::prepareFrameBuffers() creates MSAA render buffer for main content and non-MSAA FBO for immediate content as blitting of MSAA render buffers into MSAA targets is unsupported by OpenGL ES 3.0. env.bat.in has been corrected to include path to custom ANGLE (GLES2_DIR) in front of Qt which might include its own older ANGLE build. Author: kgv Date: Tue Nov 9 15:17:43 2021 +0300 0032652: Visualization - Select3D_SensitiveCylinder returns wrong 3D point on transformed shape SelectMgr_RectangularFrustum::OverlapsCylinder() - added missing 3D point transformation. StdSelect_BRepSelectionTool::ComputeSensitive() - fixed cylinder height computation on TopoDS_Shape with scale transformation. SelectMgr_AxisIntersector::OverlapsCylinder(),::OverlapsSphere() - added missing computations of surface normal. Author: msv Date: Sat Nov 13 23:53:33 2021 +0300 0030054: BRepOffset_MakeOffset fails to build joints in intersection mode Test case has been added. Author: Xu Zhongxing Date: Thu Nov 4 13:15:49 2021 +0800 0032649: Bug in BRepLib::EnsureNormalConsistency() Fix a typo in variable name. Author: kgv Date: Fri Nov 12 10:59:18 2021 +0300 0032658: Documentation - add missing GLFW sample to dox/samples/samples.md Author: akaftasev Date: Thu Oct 28 19:23:37 2021 +0300 0032448: Modeling Algorithms - Provide exact validating (as option) using GeomLib_CheckCurveOnSurface Add '-exact' option to checkshape command to use exact method to validate edges using BRepLib_ValidateEdge class. Default mode is calculating in finite number of points. Author: dipts Date: Sat Nov 13 12:49:17 2021 +0100 0032661: Coding - Forward class declaration in ProjLib collides with typeref Removed redundant forward declarations from ProjLib.hxx. Author: kgv Date: Wed Nov 10 14:21:02 2021 +0300 0032655: Configuration, qmake - add missing CSF_Draco Added CSF_Draco to OccToolkit.pri. Removed libXmu.so search from genconf. Author: ichesnok Date: Thu Oct 28 11:22:12 2021 +0300 0032096: Data Exchange - Extension for XCAFDimTolObjects_DimensionQualifier Added XCAFDimTolObjects_AngularQualifier for angles. And added field and methods for dimensions. Author: kgv Date: Wed Nov 10 12:38:56 2021 +0300 0032654: Data Exchange - fix misprint in RWGltf_TriangulationReader::readDracoBuffer() Added missing break. Fixes reading of glTF files with Normal attributes preceding Position (and eliminates redundant / erroneous copy when Position attributes precede Normal). Author: rkv Date: Thu Nov 11 00:06:46 2021 +0300 0026171: Coding rules - eliminate -Wshorten-64-to-32 CLang warnings Author: inv Date: Wed Nov 17 16:41:35 2021 +0300 Increment OCCT version up to 7.7.0dev |
|
Branch CR32672 has been updated forcibly by kgv. SHA-1: 23ce4b4af09d12fc1f2cfbfdd2f943dbcd5ba597 |
|
Branch CR32672 has been updated forcibly by kgv. SHA-1: 4da96489af670267c6d60523eab0853872736172 |
|
Patch is ready for review - OCCT: branch CR32672. http://jenkins-test-occt.nnov.opencascade.com/view/CR32672-master-KGV/view/ |
|
The patch was reviewed |
|
Combination - OCCT branch : IR-2021-11-26 master SHA - 4a837ecec21bfe24d9c224c4b59aa9779156f297 49e51745631c52b6c452c65adae4d6dfa21a1b1e Products branch : IR-2021-11-26 SHA - 5da5872bffc6c1fa745ee5e33ac09c4fffd349b4 was compiled on Linux, MacOS and Windows platforms and tested in optimize mode. Number of compiler warnings: No new/fixed warnings Regressions/Differences/Improvements: No regressions/differences CPU differences: Debian80-64: OCCT Total CPU difference: 18390.380000000398 / 18549.650000000624 [-0.86%] Products Total CPU difference: 11648.280000000103 / 11661.570000000122 [-0.11%] Windows-64-VC14: OCCT Total CPU difference: 19927.859375 / 19945.046875 [-0.09%] Products Total CPU difference: 13059.03125 / 13091.625 [-0.25%] Image differences : No differences that require special attention Memory differences : No differences that require special attention |
|
Branch CR32672 has been deleted by mnt. SHA-1: 4da96489af670267c6d60523eab0853872736172 |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-11-18 18:49 | galbramc | New Issue | |
2021-11-18 18:49 | galbramc | Assigned To | => kgv |
2021-11-18 20:02 | kgv | Product Version | => 7.6.0 |
2021-11-18 20:02 | kgv | Target Version | => 7.7.0 |
2021-11-18 20:02 | kgv | Summary | Array out of bounds compiler warning with OCCT 7.6.0 => Coding Rules - eliminate GCC9 compiler warnings -Warray-bounds |
2021-11-19 21:31 | kgv | Note Added: 0105278 | |
2021-11-21 20:41 | galbramc | Note Added: 0105321 | |
2021-11-21 23:05 | kgv | Test case number | => N/A |
2021-11-21 23:05 | kgv | Summary | Coding Rules - eliminate GCC9 compiler warnings -Warray-bounds => Coding Rules - eliminate GCC9 compiler warnings -Warray-bounds -fsantizize=undefined |
2021-11-21 23:15 | git | Note Added: 0105324 | |
2021-11-21 23:32 | git | Note Added: 0105327 | |
2021-11-21 23:54 | git | Note Added: 0105329 | |
2021-11-22 01:48 | kgv | Note Added: 0105333 | |
2021-11-22 01:48 | kgv | Assigned To | kgv => osa |
2021-11-22 01:48 | kgv | Status | new => resolved |
2021-11-22 15:58 |
|
Note Added: 0105354 | |
2021-11-22 15:58 |
|
Assigned To | osa => bugmaster |
2021-11-22 15:58 |
|
Status | resolved => reviewed |
2021-11-27 14:23 |
|
Note Added: 0105461 | |
2021-11-27 14:23 |
|
Status | reviewed => tested |
2021-11-27 14:52 |
|
Changeset attached | => occt master 120dec9f |
2021-11-27 14:52 |
|
Assigned To | bugmaster => smoskvin |
2021-11-27 14:52 |
|
Status | tested => verified |
2021-11-27 14:52 |
|
Resolution | open => fixed |
2021-11-27 15:04 | git | Note Added: 0105483 | |
2023-02-03 04:56 | vglukhik | Status | verified => closed |
2023-02-03 04:56 | vglukhik | Fixed in Version | => 7.7.0 |