View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0024897 | Community | OCCT:Foundation Classes | public | 2014-05-05 13:08 | 2014-11-11 12:52 |
Reporter | Assigned To | apn | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 6.7.1 | ||||
Target Version | 6.8.0 | Fixed in Version | 6.8.0 | ||
Summary | 0024897: Possibility of uncontrolled exit if scanner fails in ExprIntrp | ||||
Description | 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). | ||||
Steps To Reproduce | pload QAcommands CR23403 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | ||||
Tags | No tags attached. | ||||
Test case number | bugs fclasses(002) bug24897 | ||||
|
I have pushed fixes to CR24897, please review |
|
Please test the patch. |
|
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. |
|
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. |
|
Extraction was done on virtual station vm-service-01 with flex 2.5.35. |
|
Correction pushed to CR24897, please test |
|
CR24897_2 was created (contain fix 24941). |
|
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. |
occt: master 2a54ebbf 2014-05-29 11:05:47
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 |
Affected Issues 0024897 |
|
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 |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-05-05 13:08 |
|
New Issue | |
2014-05-05 13:08 |
|
Assigned To | => abv |
2014-05-06 14:49 |
|
Steps to Reproduce Updated | |
2014-05-06 16:32 |
|
Note Added: 0029216 | |
2014-05-06 16:32 |
|
Assigned To | abv => kgv |
2014-05-06 16:32 |
|
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 |
|
Assigned To | bugmaster => mkv |
2014-05-08 17:50 |
|
Note Added: 0029261 | |
2014-05-08 17:51 |
|
Test case number | => bugs fclasses(002) bug24897 |
2014-05-08 17:51 |
|
Assigned To | mkv => abv |
2014-05-08 17:51 |
|
Status | reviewed => assigned |
2014-05-19 14:52 |
|
Note Added: 0029391 | |
2014-05-19 14:52 |
|
Assigned To | abv => apn |
2014-05-19 14:52 |
|
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 |
|
Note Added: 0029450 | |
2014-05-21 18:58 |
|
Assigned To | abv => bugmaster |
2014-05-21 18:58 |
|
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 |
|
Fixed in Version | => 6.8.0 |
2014-11-11 12:52 |
|
Status | verified => closed |