Archived issue #0022595
gp_Mat's constructors incompletely initilize memory
Description
RLN_fix435
- Summary: gp_Mat's constructors incompletely initilize memory when compiled by
gcc 4.1.2 with -O2
- Detailed description: gp_Mat constructors use indirect memory reference
((Standard_Real*)&matrix[0][0])[i]) to access elements of the member field
matrix[3][3]. Likely due to gcc bug this results in uninitialized memory and
further crashes when using that garbage. See details at
http://www.opencascade.org/org/forum/thread_19603/.
gp_XYZ.lxx had to be fixed as well since it used the same macros defined in
gp_Mat.lxx. Macros in gp_Mat.lxx could be removed too to avoid possible
conflicts with user's code but currently left to minimize modifications.
- Summary: gp_Mat's constructors incompletely initilize memory when compiled by
gcc 4.1.2 with -O2
- Detailed description: gp_Mat constructors use indirect memory reference
((Standard_Real*)&matrix[0][0])[i]) to access elements of the member field
matrix[3][3]. Likely due to gcc bug this results in uninitialized memory and
further crashes when using that garbage. See details at
http://www.opencascade.org/org/forum/thread_19603/.
gp_XYZ.lxx had to be fixed as well since it used the same macros defined in
gp_Mat.lxx. Macros in gp_Mat.lxx could be removed too to avoid possible
conflicts with user's code but currently left to minimize modifications.
Public activity
3 archived notes
Participants are labeled by their role within this record.
SVN branch http://svn/svn/occt/branches/OCC22595_MatExplicitfields passed
review without remarks.
Branch is ready for testing.
review without remarks.
Branch is ready for testing.
Dear Commenter 1,
SVN branch ( http://svn/svn/occt/branches/OCC22595_MatExplicitfields ) was
testing, test results were compared with KAS:dev:products-651-opt
Regressions were not found
Create DRAW-command for this bug ( OCC22595 )
Test case for this bug ( chl/937/C4 )
See results in /KASDev/OCCTtests/KAS/dev/products-testing_23062011/lin
See reference results in
/QADisk/occttests/results/KAS/dev/products-651-opt_01062011/lin
See test cases in /QADisk/occttests/tests/ED
N.B. In order to launch testing case you can make use the following instructions
http://sbu.nnov.opencascade.com/maintenance/main_certification_te.html
SVN branch ( http://svn/svn/occt/branches/OCC22595_MatExplicitfields ) was
testing, test results were compared with KAS:dev:products-651-opt
Regressions were not found
Create DRAW-command for this bug ( OCC22595 )
Test case for this bug ( chl/937/C4 )
See results in /KASDev/OCCTtests/KAS/dev/products-testing_23062011/lin
See reference results in
/QADisk/occttests/results/KAS/dev/products-651-opt_01062011/lin
See test cases in /QADisk/occttests/tests/ED
N.B. In order to launch testing case you can make use the following instructions
http://sbu.nnov.opencascade.com/maintenance/main_certification_te.html
Integrated to occt repository
Date: 2011-07-14 18:35:26 +0400 (Thu, 14 Jul 2011)
New Revision: 8691
Modified:
trunk/src/gp/gp_Mat.lxx
trunk/src/gp/gp_XYZ.lxx
Date: 2011-07-14 18:35:26 +0400 (Thu, 14 Jul 2011)
New Revision: 8691
Modified:
trunk/src/gp/gp_Mat.lxx
trunk/src/gp/gp_XYZ.lxx
Related records