View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update | 
|---|---|---|---|---|---|
| 0001286 | FreeCAD | Bug | public | 2013-10-24 06:52 | 2014-09-17 09:51 | 
| Reporter | shoogen | Assigned To | shoogen | ||
| Priority | normal | Severity | crash | Reproducibility | sometimes | 
| Status | closed | Resolution | fixed | ||
| Product Version | 0.13 | ||||
| Summary | 0001286: OCCT Exceptions without a Message causes SIGSEGV | ||||
| Description | OCCT allows Standard_Failure not to have a Message. Querying for the message return a NULL pointer. Calling PyErr_SetString(PyExc_Exception, 0); causes a null pointer dereference (in the glibc in linux_x86_64) PyErr_SetString(PyExc_Exception, e->GetMessageString()); | ||||
| Additional Information | possible fix check for NULL pointer. Standard_CString msg = e->GetMessageString(); PyErr_SetString(PyExc_Exception, msg ? msg : 'Standard_Failure without message' ); | ||||
| Tags | No tags attached. | ||||
| FreeCAD Information | |||||
|  | OS: Debian GNU/Linux 7.2 (wheezy) Platform: 64-bit Version: 0.14.2667 (Git) Branch: dev-0000895-BSpline Hash: 35633a606c2f35b231f09e6250508aa32458f2b0 Python version: 2.7.3 Qt version: 4.8.2 Coin version: 3.1.3 SoQt version: 1.5.0 OCC version: 6.5.0 | 
|  | Better solution (used in Part::BSplineCurvePy::makeC1Continuous) catch (Standard_Failure) { Handle_Standard_Failure e = Standard_Failure::Caught(); std::string err = e->GetMessageString(); if (err.empty()) err = e->DynamicType()->Name(); PyErr_SetString(PyExc_Exception, err.c_str()); return 0; } | 
|  | > std::string err = e->GetMessageString(); In case the method returns a null pointer then the assignment to std::string also gives a SIGSEGV! | 
|  | The new PY_CATCH_OCC macro will check for a NULL message. | 
| Date Modified | Username | Field | Change | 
|---|---|---|---|
| 2013-10-24 06:52 | shoogen | New Issue | |
| 2013-10-24 06:55 | shoogen | Note Added: 0003794 | |
| 2013-10-24 08:23 | shoogen | Note Added: 0003796 | |
| 2013-10-24 12:26 | wmayer | Note Added: 0003798 | |
| 2014-08-19 14:13 | shoogen | Relationship added | related to 0001422 | 
| 2014-08-19 14:13 | shoogen | Relationship added | related to 0001700 | 
| 2014-08-20 15:09 | shoogen | Note Added: 0004980 | |
| 2014-09-17 09:51 | shoogen | Status | new => closed | 
| 2014-09-17 09:51 | shoogen | Assigned To | => shoogen | 
| 2014-09-17 09:51 | shoogen | Resolution | open => fixed | 
 FreeCAD
 FreeCAD