View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0033048 | Open CASCADE | OCCT:Foundation Classes | public | 2022-07-01 09:06 | 2023-03-19 19:30 |
Reporter | Assigned To | ||||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 7.6.0 | ||||
Target Version | 7.7.0 | Fixed in Version | 7.6.3 | ||
Summary | 0033048: Foundation Classes - math_ComputeKronrodPointsAndWeights indexation goes beyond the limit | ||||
Description | This issue is found during studying the results of CppCheck (0033024). The following block is invalid: Standard_Integer aNd2 = Number/2; Standard_Real *s = new Standard_Real[aNd2 + 2]; Standard_Real *t = new Standard_Real[aNd2 + 2]; Standard_Real *ss = s++; Standard_Real *tt = t++; for (i = -1; i <= aNd2; i++) { s[i] = 0.; t[i] = 0.; } Here, memory is allocated manually without usage of smart pointers (welcome memleaks!) and value is assigned to index -1 that is outside the allowed boundaries [0, aNd2 + 1]. Analysis shows that this class is passed to math::KronrodPointsAndWeights as alternative method of Kronrod poitns and weights calculation for high indices but it seems to be not used. One should pick one of the following options: 1. Get rid of suspicious class. 2. Identify & fix all the issues, write tests to cover this functionality _______________________________________________________________________ Analysis revealed that algorithm is OK, and pointer-based raw memory manipulation is correct in this particular case. It is worth adding explanatory comment and test to avoid misunderstanding in future. | ||||
Steps To Reproduce | N/A | ||||
Tags | No tags attached. | ||||
Test case number | bugs/fclasses/bug33048 | ||||
|
Branch CR33048 has been created by aml. SHA-1: 7c44c17b872b3b72a3b0bea328188739b68aa01b Detailed log of new commits: Author: aml Date: Fri Jul 1 09:10:38 2022 +0300 0033048: Foundation Classes - math_ComputeKronrodPointsAndWeights indexation go beyond the limit Remove non-used math_ComputeKronrodPointsAndWeights class. |
|
Dear Artem, It seems this functionality is not used in our tests. Could you please invite IFV and MSV into the discussion? From my point of view, we should remove this class. |
|
Alexander, I propose to implement a specific test case, which covers math_ComputeKronrodPointsAndWeights functionality. |
|
Alexander, IFV found the DRAW command, which calls the inquiring functionality: vpropsgk : vpropsgk name epsilon closed span mode [x y z] [-skip] : compute volumic properties Hope, this could help you in writing test cases. |
|
Branch CR33048 has been updated forcibly by aml. SHA-1: 2b874eea0c9c9f534225533f0f201a3d67b0c166 |
|
Branch CR33048 has been updated forcibly by aml. SHA-1: 6ec018d79dbd712976f037bc0faebb1d4e6a413c |
|
Branch CR33048 has been updated forcibly by aml. SHA-1: 94cf91ba74c411035046a52881013b21c6549ae7 |
|
Branch CR33048 has been updated forcibly by aml. SHA-1: 0286a31165ef3bfea5b2e40dee3bdf4e9c6e9d3b |
|
Analysis revealed that algorithm is OK, and pointer-based raw memory manipulation is correct in this particular case. It is worth adding explanatory comment and test to avoid misunderstanding in future. |
|
Branch CR33048 has been updated forcibly by aml. SHA-1: 0f21ac509eee096ba08538b1e072f0f47e65df28 |
|
Artem, Could you please take a look at the CR33048 branch? - Explanatory comment is added. - Test case is added. |
|
Branches for integration: OCCT: CR33048 Products: NO |
|
Combination - OCCT branch : IR-2022-07-08 master SHA - changes and them, and you can discard any commits you make in this 33c8a72788661285860902f261062e39f32a2d46 changes and them, and you can discard any commits you make in this e0ceb716c70188b98130b1550914140d0502a6f9 Products branch : IR-2022-07-08 SHA - 79a687f1cd4081ec53ec08c201360e89fce62abc 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: 18685.930000000586 / 18908.870000000694 [-1.18%] Products Total CPU difference: 11796.890000000125 / 11832.130000000114 [-0.30%] Windows-64-VC14: OCCT Total CPU difference: 20784.828125 / 20752.59375 [+0.16%] Products Total CPU difference: 13361.3125 / 13368.90625 [-0.06%] Image differences : No differences that require special attention Memory differences : No differences that require special attention |
|
Branch CR33048 has been deleted by mnt. SHA-1: 0f21ac509eee096ba08538b1e072f0f47e65df28 |
occt: master c2eed2a3 2022-07-04 12:41:15
Committer: |
0033048: Foundation Classes - math_ComputeKronrodPointsAndWeights indexation goes beyond the limit Add test and explanatory comment. |
Affected Issues 0033048 |
|
mod - src/math/math_ComputeKronrodPointsAndWeights.cxx | Diff File | ||
mod - src/QABugs/QABugs_20.cxx | Diff File | ||
add - tests/bugs/fclasses/bug33048 | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2022-07-01 09:06 |
|
New Issue | |
2022-07-01 09:06 |
|
Assigned To | => aml |
2022-07-01 09:09 |
|
Relationship added | child of 0033024 |
2022-07-01 09:09 |
|
Relationship added | related to 0033033 |
2022-07-01 09:11 | git | Note Added: 0109433 | |
2022-07-01 11:55 |
|
Note Added: 0109443 | |
2022-07-01 11:55 |
|
Assigned To | aml => azv |
2022-07-01 11:55 |
|
Status | new => feedback |
2022-07-02 15:58 |
|
Note Added: 0109517 | |
2022-07-02 15:58 |
|
Assigned To | azv => aml |
2022-07-04 10:28 |
|
Note Added: 0109524 | |
2022-07-04 10:28 |
|
Status | feedback => assigned |
2022-07-04 12:41 | git | Note Added: 0109529 | |
2022-07-04 12:44 |
|
Summary | Foundation Classes - math_ComputeKronrodPointsAndWeights indexation go beyond the limit => Foundation Classes - math_ComputeKronrodPointsAndWeights indexation goes beyond the limit |
2022-07-04 12:44 | git | Note Added: 0109530 | |
2022-07-04 12:46 | git | Note Added: 0109531 | |
2022-07-05 14:18 | git | Note Added: 0109570 | |
2022-07-05 14:21 |
|
Description Updated | |
2022-07-05 14:21 |
|
Note Added: 0109571 | |
2022-07-05 14:26 |
|
Note Edited: 0109571 | |
2022-07-05 14:27 |
|
Description Updated | |
2022-07-06 06:50 | git | Note Added: 0109587 | |
2022-07-06 06:51 |
|
Assigned To | aml => azv |
2022-07-06 06:51 |
|
Status | assigned => resolved |
2022-07-06 06:51 |
|
Steps to Reproduce Updated | |
2022-07-06 06:51 |
|
Note Added: 0109588 | |
2022-07-06 07:06 |
|
Assigned To | azv => bugmaster |
2022-07-06 07:06 |
|
Status | resolved => reviewed |
2022-07-06 07:06 |
|
Note Added: 0109589 | |
2022-07-10 11:21 |
|
Status | reviewed => tested |
2022-07-10 11:21 |
|
Note Added: 0109708 | |
2022-07-10 11:23 |
|
Test case number | => bugs/fclasses/bug33048 |
2022-07-10 12:03 |
|
Changeset attached | => occt master c2eed2a3 |
2022-07-10 12:03 |
|
Assigned To | bugmaster => aml |
2022-07-10 12:03 |
|
Status | tested => verified |
2022-07-10 12:03 |
|
Resolution | open => fixed |
2022-07-10 12:09 | git | Note Added: 0109741 | |
2023-03-19 19:30 | vglukhik | Status | verified => closed |
2023-03-19 19:30 | vglukhik | Fixed in Version | => 7.6.3 |