MantisBT - Community
View Issue Details
0024897Community[OCCT] OCCT:Foundation Classespublic2014-05-05 13:082014-11-11 12:52
abv 
apn 
normalminor 
closedfixed 
[OCCT] 6.7.1 
[OCCT] 6.8.0[OCCT] 6.8.0 
bugs fclasses(002) bug24897
0024897: Possibility of uncontrolled exit if scanner fails in ExprIntrp
As 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).
pload QAcommands
CR23403 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
No tags attached.
Issue History
2014-05-05 13:08abvNew Issue
2014-05-05 13:08abvAssigned To => abv
2014-05-06 14:49abvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=7398#r7398
2014-05-06 14:50abvRelationship addedrelated to 0023403
2014-05-06 16:32abvNote Added: 0029216
2014-05-06 16:32abvAssigned Toabv => kgv
2014-05-06 16:32abvStatusnew => resolved
2014-05-06 17:04kgvNote Added: 0029217
2014-05-06 17:04kgvAssigned Tokgv => bugmaster
2014-05-06 17:04kgvStatusresolved => reviewed
2014-05-07 10:48mkvAssigned Tobugmaster => mkv
2014-05-08 17:50mkvNote Added: 0029261
2014-05-08 17:51mkvTest case number => bugs fclasses(002) bug24897
2014-05-08 17:51mkvAssigned Tomkv => abv
2014-05-08 17:51mkvStatusreviewed => assigned
2014-05-19 14:52abvNote Added: 0029391
2014-05-19 14:52abvAssigned Toabv => apn
2014-05-19 14:52abvStatusassigned => feedback
2014-05-21 13:06apnNote Added: 0029434
2014-05-21 13:06apnAssigned Toapn => abv
2014-05-21 18:58abvNote Added: 0029450
2014-05-21 18:58abvAssigned Toabv => bugmaster
2014-05-21 18:58abvStatusfeedback => reviewed
2014-05-22 10:57bugmasterAssigned Tobugmaster => apn
2014-05-23 14:24apnNote Added: 0029493
2014-05-26 17:56apnNote Added: 0029520
2014-05-26 17:57apnAssigned Toapn => bugmaster
2014-05-26 17:57apnStatusreviewed => tested
2014-05-30 12:59apnChangeset attached => occt master 2a54ebbf
2014-05-30 12:59apnAssigned Tobugmaster => apn
2014-05-30 12:59apnStatustested => verified
2014-05-30 12:59apnResolutionopen => fixed
2014-11-11 12:46aivFixed in Version => 6.8.0
2014-11-11 12:52aivStatusverified => closed

Notes
(0029216)
abv   
2014-05-06 16:32   
I have pushed fixes to CR24897, please review
(0029217)
kgv   
2014-05-06 17:04   
Please test the patch.
(0029261)
mkv   
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   
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   
2014-05-21 13:06   
Extraction was done on virtual station vm-service-01 with flex 2.5.35.
(0029450)
abv   
2014-05-21 18:58   
Correction pushed to CR24897, please test
(0029493)
apn   
2014-05-23 14:24   
CR24897_2 was created (contain fix 24941).
(0029520)
apn   
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.