MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0024897Community[OCCT] OCCT:Foundation Classespublic2014-05-05 13:082014-11-11 12:52
Reporterabv 
Assigned Toapn 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version[OCCT] 6.7.1 
Target Version[OCCT] 6.8.0Fixed in Version[OCCT] 6.8.0 
Summary0024897: Possibility of uncontrolled exit if scanner fails in ExprIntrp
DescriptionAs discovered during analysis of issue reported in oce (https://github.com/tpaviot/oce/issues/490 [^]), ExprIntrp parser may call exit() in case of internal error, which will lead to uncontrolled exit of the application that uses this parser.

To avoid this, the lex error handler function should be redefined in ExprIntrp.lex to provide more safe behavior (raising exception, as yacc code does).
Steps To Reproducepload QAcommands
CR23403 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
TagsNo tags attached.
Test case numberbugs fclasses(002) bug24897
Attached Files

- Relationships

-  Notes
(0029216)
abv (manager)
2014-05-06 16:32

I have pushed fixes to CR24897, please review
(0029217)
kgv (developer)
2014-05-06 17:04

Please test the patch.
(0029261)
mkv (tester)
2014-05-08 17:50

Dear BugMaster,

Branch CR24897 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: 8115e69e12cf8643554bc43e7bb5b56cca9b5820

Number of compiler warnings:

occt component :
Linux: 18 (18 on master)
Windows: 1 (0 on master)

There is new additional compilation warning on Windows platform:
http://jenkins-test-02.nnov.opencascade.com:8080/user/mnt/my-views/view/CR24897/job/mnt-CR24897-master_build_occt_windows/1/warnings30Result/new/file.-794558466/ [^]
lex.ExprIntrp.c:2166, MSBuild, Priority: Normal
'function' : different 'const' qualifiers

products component :
Linux: 11 (12 on master)
Windows: 2 (2 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
http://occt-tests/CR24897-master-occt/Windows-32-VC9/bugs/fclasses/bug24897.html [^]
bugs fclasses(002) bug24897: OK

Testing on Windows:
Total MEMORY difference: 379819140 / 380374356
Total CPU difference: 33281.625 / 37765.640625

There are no differences in images found by testdiff.
(0029391)
abv (manager)
2014-05-19 14:52

I could not reproduce this warning using WOK 6.7.1, neither on Windows nor taking lex.ExprIntrp.c generated on Linux. Please provide problematic file (lex.ExprIntrp.c) for analysis, and indicate version on flex that generated it.
(0029434)
apn (administrator)
2014-05-21 13:06

Extraction was done on virtual station vm-service-01 with flex 2.5.35.
(0029450)
abv (manager)
2014-05-21 18:58

Correction pushed to CR24897, please test
(0029493)
apn (administrator)
2014-05-23 14:24

CR24897_2 was created (contain fix 24941).
(0029520)
apn (administrator)
2014-05-26 17:56

Dear BugMaster,

Branch CR24897_2 (and products from CR24941 master) was compiled on Linux, Windows and MacOS platforms and tested.
SHA-1: e86192978f832b63d22579b65bba7c74cc6db230

Number of compiler warnings:

occt component :
Linux: 17 (17 on master)
Windows: 0 (0 on master)
MacOS: 202 (205 on master)

products component :
Linux: 11 (11 on master)
Windows: 2 (2 on master)

Regressions/Differences:
No regressions

Testing cases:
bugs fclasses bug24897 - OK
http://occt-tests/CR24897-2-CR24941-occt/Windows-32-VC9/bugs/fclasses/bug24897.html [^]

Testing on Linux:
Total MEMORY difference: 359298672 / 359742796
Total CPU difference: 53803.03999999991 / 51526.670000000115

Testing on Windows:
Total MEMORY difference: 381894512 / 382747756
Total CPU difference: 38022.234375 / 39034.203125

There are no differences in images found by testdiff.

- Related Changesets
occt: master 2a54ebbf
Timestamp: 2014-05-29 11:05:47
Author: abv
Committer: apn
Details ] Diff ]
0024897: Possibility of uncontrolled exit if scanner fails in ExprIntrp

Macro YY_FATAL_ERROR() is defined in ExprIntrp.lex in order to have exception instead of program exit in case of scanner error. Fixed-length string buffers are replaced by TCollection_AsciiString to avoid buffer overflow.
Some code refactoring: declarations of functions moved to header file, unused global declarations and variables removed, compiler warnings fixed or disabled, obsolete EDL file removed.
Test case for issue CR24897
Correction of MSVC compiler warning when scanner is generated using Flex 2.5.35 on Linux
mod - src/ExprIntrp/ExprIntrp.cxx Diff ] File ]
mod - src/ExprIntrp/ExprIntrp.lex Diff ] File ]
mod - src/ExprIntrp/ExprIntrp.yacc Diff ] File ]
rm - src/ExprIntrp/ExprIntrp_CMPLRS.edl Diff ] File ]
mod - src/ExprIntrp/ExprIntrp_yaccintrf.cxx Diff ] File ]
mod - src/ExprIntrp/ExprIntrp_yaccintrf.hxx Diff ] File ]
mod - src/ExprIntrp/ExprIntrp_yacclex.cxx Diff ] File ]
mod - src/ExprIntrp/FILES Diff ] File ]
mod - src/StepFile/step.lex Diff ] File ]
add - tests/bugs/fclasses/bug24897 Diff ] File ]

- Issue History
Date Modified Username Field Change
2014-05-05 13:08 abv New Issue
2014-05-05 13:08 abv Assigned To => abv
2014-05-06 14:49 abv Steps to Reproduce Updated View Revisions
2014-05-06 14:50 abv Relationship added related to 0023403
2014-05-06 16:32 abv Note Added: 0029216
2014-05-06 16:32 abv Assigned To abv => kgv
2014-05-06 16:32 abv Status new => resolved
2014-05-06 17:04 kgv Note Added: 0029217
2014-05-06 17:04 kgv Assigned To kgv => bugmaster
2014-05-06 17:04 kgv Status resolved => reviewed
2014-05-07 10:48 mkv Assigned To bugmaster => mkv
2014-05-08 17:50 mkv Note Added: 0029261
2014-05-08 17:51 mkv Test case number => bugs fclasses(002) bug24897
2014-05-08 17:51 mkv Assigned To mkv => abv
2014-05-08 17:51 mkv Status reviewed => assigned
2014-05-19 14:52 abv Note Added: 0029391
2014-05-19 14:52 abv Assigned To abv => apn
2014-05-19 14:52 abv Status assigned => feedback
2014-05-21 13:06 apn Note Added: 0029434
2014-05-21 13:06 apn Assigned To apn => abv
2014-05-21 18:58 abv Note Added: 0029450
2014-05-21 18:58 abv Assigned To abv => bugmaster
2014-05-21 18:58 abv Status feedback => reviewed
2014-05-22 10:57 bugmaster Assigned To bugmaster => apn
2014-05-23 14:24 apn Note Added: 0029493
2014-05-26 17:56 apn Note Added: 0029520
2014-05-26 17:57 apn Assigned To apn => bugmaster
2014-05-26 17:57 apn Status reviewed => tested
2014-05-30 12:59 apn Changeset attached => occt master 2a54ebbf
2014-05-30 12:59 apn Assigned To bugmaster => apn
2014-05-30 12:59 apn Status tested => verified
2014-05-30 12:59 apn Resolution open => fixed
2014-11-11 12:46 user533 Fixed in Version => 6.8.0
2014-11-11 12:52 user533 Status verified => closed


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker