View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0029925 | Open CASCADE | OCCT:Foundation Classes | public | 2018-07-03 00:44 | 2018-07-08 12:00 |
Reporter | kgv | Assigned To | bugmaster | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 7.3.0 | ||||
Target Version | 7.4.0 | Fixed in Version | 7.4.0 | ||
Summary | 0029925: Foundation Classes - add missing cast to LowerCase() and UpperCase() arguments | ||||
Description | Current implementation of LowerCase()/UpperCase() may trigger issues:inline Standard_Character LowerCase(const Standard_Character me) { return (Standard_Character)(unsigned char)std::tolower(me); } inline Standard_Character UpperCase(const Standard_Character me) { return (Standard_Character)(unsigned char)std::toupper(me); } Note that similar methods IsLowerCase()/IsUpperCase() has necessary cast. | ||||
Steps To Reproduce | N/A | ||||
Tags | No tags attached. | ||||
Test case number | bugs/fclasses/bug29925 | ||||
|
Branch CR29925 has been created by kgv. SHA-1: 4d0bc0f6a78f0343696e48f000771f2b34fc163f Detailed log of new commits: Author: kgv Date: Tue Jul 3 00:45:41 2018 +0300 0029925: Foundation Classes - add missing cast to LowerCase() and UpperCase() arguments |
|
Patch is ready for review. http://jenkins-test-11.nnov.opencascade.com/view/CR29925-master-KGV/ |
|
Branch CR29925 has been updated by abv. SHA-1: 7d2bd2237e05c457145be750c5a447ff11c48c02 Detailed log of new commits: Author: abv Date: Tue Jul 3 09:43:03 2018 +0300 Argument of LowerCase() and UpperCase() is cast to int via unsigned char to avoid passing negative integer in the case if the argument char is in the extended part of ASCII table (which would result in undefined behavior according to C++ standard). Added test bugs fclasses bug29925 |
|
Reviewed with a test case and commit message added; please integrate |
|
Combination - OCCT branch : CR29925 SHA - 4d0bc0f6a78f0343696e48f000771f2b34fc163f Products branch : master SHA - 8ff715ac468ec83b3308d4e7f390b228b95c965a 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: Debian70-64: OCCT Total CPU difference: 17142.029999999697 / 17168.50999999987 [-0.15%] Products Total CPU difference: 7474.240000000029 / 7526.93000000002 [-0.70%] Windows-64-VC10: OCCT Total CPU difference: 16875.298974298472 / 16935.000556998602 [-0.35%] Products Total CPU difference: 8244.69965029989 / 8215.262261599859 [+0.36%] Image differences : No differences that require special attention Memory differences : No differences that require special attention |
|
Branch CR29925 has been deleted by inv. SHA-1: 7d2bd2237e05c457145be750c5a447ff11c48c02 |
occt: master d9d3107d 2018-07-02 21:45:41 Committer: bugmaster Details Diff |
0029925: Foundation Classes - add missing cast to LowerCase() and UpperCase() arguments Argument of LowerCase() and UpperCase() is cast to int via unsigned char to avoid passing negative integer in the case if the argument char is in the extended part of ASCII table (which would result in undefined behavior according to C++ standard). |
Affected Issues 0029925 |
|
mod - src/QABugs/QABugs_20.cxx | Diff File | ||
mod - src/Standard/Standard_Character.hxx | Diff File | ||
add - tests/bugs/fclasses/bug29925 | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-07-03 00:44 | kgv | New Issue | |
2018-07-03 00:44 | kgv | Assigned To | => abv |
2018-07-03 00:46 | git | Note Added: 0077218 | |
2018-07-03 07:05 | kgv | Note Added: 0077219 | |
2018-07-03 07:05 | kgv | Status | new => resolved |
2018-07-03 10:00 | git | Note Added: 0077220 | |
2018-07-03 10:01 |
|
Note Added: 0077221 | |
2018-07-03 10:01 |
|
Assigned To | abv => bugmaster |
2018-07-03 10:01 |
|
Status | resolved => reviewed |
2018-07-03 17:51 | bugmaster | Test case number | => bugs/fclasses/bug29925 |
2018-07-03 17:53 | bugmaster | Note Added: 0077242 | |
2018-07-03 17:53 | bugmaster | Status | reviewed => tested |
2018-07-08 11:37 | bugmaster | Changeset attached | => occt master d9d3107d |
2018-07-08 11:37 | bugmaster | Status | tested => verified |
2018-07-08 11:37 | bugmaster | Resolution | open => fixed |
2018-07-08 12:00 | git | Note Added: 0077360 |