MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0029925Open CASCADE[OCCT] OCCT:Foundation Classespublic2018-07-03 00:442018-07-08 12:00
Reporterkgv 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusverifiedResolutionfixed 
PlatformOSOS Version
Product Version[OCCT] 7.3.0 
Target Version[OCCT] 7.4.0*Fixed in Version 
Summary0029925: Foundation Classes - add missing cast to LowerCase() and UpperCase() arguments
DescriptionCurrent 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 ReproduceN/A
TagsNo tags attached.
Test case numberbugs/fclasses/bug29925
Attached Files

- Relationships

-  Notes
(0077218)
git (administrator)
2018-07-03 00:46

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
(0077219)
kgv (developer)
2018-07-03 07:05

Patch is ready for review.

http://jenkins-test-11.nnov.opencascade.com/view/CR29925-master-KGV/ [^]
(0077220)
git (administrator)
2018-07-03 10:00

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

(0077221)
abv (manager)
2018-07-03 10:01

Reviewed with a test case and commit message added; please integrate
(0077242)
bugmaster (administrator)
2018-07-03 17:53

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
(0077360)
git (administrator)
2018-07-08 12:00

Branch CR29925 has been deleted by inv.

SHA-1: 7d2bd2237e05c457145be750c5a447ff11c48c02

- Related Changesets
occt: master d9d3107d
Timestamp: 2018-07-02 21:45:41
Author: kgv
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).
mod - src/QABugs/QABugs_20.cxx Diff ] File ]
mod - src/Standard/Standard_Character.hxx Diff ] File ]
add - tests/bugs/fclasses/bug29925 Diff ] File ]

- Issue History
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 00:46 kgv Relationship added related to 0029913
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 abv Note Added: 0077221
2018-07-03 10:01 abv Assigned To abv => bugmaster
2018-07-03 10:01 abv 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


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker