View Issue Details

IDProjectCategoryView StatusLast Update
0030754CommunityOCCT:Codingpublic2019-06-16 11:39
Reporterzale_lzj Assigned Tobugmaster  
PrioritynormalSeveritytrivial 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2015 
Product Version7.3.0 
Target Version7.4.0Fixed in Version7.4.0 
Summary0030754: Coding - the array of weights should begin with Lower, not the constant value 1 within Geom_BSplineCurve.cxx
Descriptionstatic Standard_Boolean Rational(const TColStd_Array1OfReal& W);

this function in Geom2d_BSplineCurve.cxx and Geom_BSplineCurve.cxx, use the constant value 1 as the lower index, but the variable W could use other value as the lower index, for example 0. If use 0, the function Rational() maybe overflow.
Additional information
and documentation updates
static Standard_Boolean Rational(const TColStd_Array1OfReal& W)
{
  Standard_Integer i, n = W.Length();
  Standard_Boolean rat = Standard_False;
  for (i = 1; i < n; i++) {
    rat = Abs(W(i) - W(i+1)) > gp::Resolution();
    if (rat) break;
  }
  return rat;
}

Please check the code above, the variable i should begin form W.Lower();
TagsNo tags attached.
Test case numberNot required

Activities

git

2019-06-05 09:34

administrator   ~0084841

Branch CR30754 has been created by kgv.

SHA-1: 4121f01125492daee4ad653e294e60c8fb71368b


Detailed log of new commits:

Author: kgv
Date: Wed Jun 5 09:34:21 2019 +0300

    0030754: Coding - the array of weights should begin with Lower, not the constant value 1 within Geom_BSplineCurve.cxx

kgv

2019-06-05 11:05

developer   ~0084849

Patch is ready for review.

http://jenkins-test-12.nnov.opencascade.com:8080/view/CR30754-master-KGV/

msv

2019-06-14 17:20

developer   ~0085056

Reviewed.

bugmaster

2019-06-14 18:57

administrator   ~0085061

Combination -
OCCT branch : CR30754
master SHA - 4121f01125492daee4ad653e294e60c8fb71368b
d67d4b811012eef8913d3c535c29654d0acf3c4c
Products branch : master SHA - c337118ac41004248abf27585e4c0e972f1a923e
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: 16263.989999999998 / 16313.930000000051 [-0.31%]
Products
Total CPU difference: 10485.570000000049 / 10490.14000000005 [-0.04%]
Windows-64-VC14:
OCCT
Total CPU difference: 17717.1875 / 17714.90625 [+0.01%]
Products
Total CPU difference: 12073.109375 / 12054.984375 [+0.15%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2019-06-16 11:39

administrator   ~0085069

Branch CR30754 has been deleted by inv.

SHA-1: 4121f01125492daee4ad653e294e60c8fb71368b

Related Changesets

occt: master 6b41f0f3

2019-06-05 06:34:21

kgv


Committer: bugmaster Details Diff
0030754: Coding - the array of weights should begin with Lower, not the constant value 1 within Geom_BSplineCurve.cxx Affected Issues
0030754
mod - src/Geom/Geom_BSplineCurve.cxx Diff File
mod - src/Geom2d/Geom2d_BSplineCurve.cxx Diff File

Issue History

Date Modified Username Field Change
2019-05-29 04:23 zale_lzj New Issue
2019-05-29 04:23 zale_lzj Assigned To => kgv
2019-06-05 09:34 kgv Summary the array of weights should begin with Lower, not the constant value 1 => Coding - the array of weights should begin with Lower, not the constant value 1 within Geom_BSplineCurve.cxx
2019-06-05 09:34 git Note Added: 0084841
2019-06-05 11:05 kgv Note Added: 0084849
2019-06-05 11:05 kgv Assigned To kgv => msv
2019-06-05 11:05 kgv Severity minor => trivial
2019-06-05 11:05 kgv Status new => resolved
2019-06-05 11:05 kgv Target Version => 7.4.0
2019-06-14 17:20 msv Note Added: 0085056
2019-06-14 17:20 msv Assigned To msv => bugmaster
2019-06-14 17:20 msv Status resolved => reviewed
2019-06-14 18:57 bugmaster Note Added: 0085061
2019-06-14 18:57 bugmaster Status reviewed => tested
2019-06-14 18:57 bugmaster Test case number => Not required
2019-06-15 16:04 bugmaster Changeset attached => occt master 6b41f0f3
2019-06-15 16:04 bugmaster Status tested => verified
2019-06-15 16:04 bugmaster Resolution open => fixed
2019-06-16 11:39 git Note Added: 0085069