View Issue Details

IDProjectCategoryView StatusLast Update
0030762Open CASCADEOCCT:Foundation Classespublic2021-06-12 17:09
Reporterkgv Assigned Tobugmaster  
PrioritynormalSeverityfeature 
Status closedResolutionfixed 
Target Version7.6.0Fixed in Version7.6.0 
Summary0030762: Foundation Classes - include backtrace within OSD_SIGSEGV
DescriptionIt would be helpful if exceptions like OSD_SIGSEGV will include backtrace, so that it will be possible determining context without debugger.

** Exception ** 0x55b5bce52950 : OSD_SIGSEGV: SIGSEGV 'segmentation violation' detected. Address 38
/lib/x86_64-linux-gnu/libc.so.6(+0x3ef20) [0x7fd984d6ff20]
/occt/adm/qmake/Draw/DRAWEXE/../../../../lin/gcc/libd/libTKOpenGl.so.7(_ZNK14OpenGl_Texture5SizeXEv+0xc) [0x7fd97458dfa4]
/occt/adm/qmake/Draw/DRAWEXE/../../../../lin/gcc/libd/libTKOpenGl.so.7(_ZN11OpenGl_Font11renderGlyphERKN11opencascade6handleI14OpenGl_ContextEEDi+0xdc) [0x7fd97460be62]
/occt/adm/qmake/Draw/DRAWEXE/../../../../lin/gcc/libd/libTKOpenGl.so.7(_ZN11OpenGl_Font11RenderGlyphERKN11opencascade6handleI14OpenGl_ContextEEDiRNS_4TileE+0x68) [0x7fd97460c234]
/occt/adm/qmake/Draw/DRAWEXE/../../../../lin/gcc/libd/libTKOpenGl.so.7(_ZN18OpenGl_TextBuilder12createGlyphsERK18Font_TextFormatterRKN11opencascade6handleI14OpenGl_ContextEER11OpenGl_FontR18NCollection_VectorIjERSB_I18NCollection_HandleISB_I16NCollection_Vec2IfEEEESK_+0x2ef) [0x7fd97466b70d]
/occt/adm/qmake/Draw/DRAWEXE/../../../../lin/gcc/libd/libTKOpenGl.so.7(_ZN18OpenGl_TextBuilder7PerformERK18Font_TextFormatterRKN11opencascade6handleI14OpenGl_ContextEER11OpenGl_FontR18NCollection_VectorIjERSB_INS4_I19OpenGl_VertexBufferEEESH_+0xfd) [0x7fd97466bd6b]
/occt/adm/qmake/Draw/DRAWEXE/../../../../lin/gcc/libd/libTKOpenGl.so.7(_ZNK11OpenGl_Text6renderERKN11opencascade6handleI14OpenGl_ContextEERK14OpenGl_AspectsRK16NCollection_Vec4IfESC_j+0x2fc) [0x7fd9745a7aac]
/occt/adm/qmake/Draw/DRAWEXE/../../../../lin/gcc/libd/libTKOpenGl.so.7(_ZNK11OpenGl_Text6RenderERKN11opencascade6handleI16OpenGl_WorkspaceEE+0x241) [0x7fd9745a5bdf]
/occt/adm/qmake/Draw/DRAWEXE/../../../../lin/gcc/libd/libTKOpenGl.so.7(+0x118d03) [0x7fd97459bd03]
Steps To Reproducebugs/fclasses/bug30762
Additional information
and documentation updates
Windows output sample:
OCC30762 
Test normal backtrace...

==Backtrace==
c:\install_local\CR30762_6-master-KGV\Windows-64-VC14-opt\OCCT\win64\vc14\bin\TKQADraw.dll(QABugs::Commands_11)
c:\install_local\CR30762_6-master-KGV\Windows-64-VC14-opt\OCCT\win64\vc14\bin\TKQADraw.dll(QABugs::Commands_11)
c:\install_local\CR30762_6-master-KGV\Windows-64-VC14-opt\OCCT\win64\vc14\bin\TKQADraw.dll(QABugs::Commands_11)
c:\install_local\CR30762_6-master-KGV\Windows-64-VC14-opt\OCCT\win64\vc14\bin\TKQADraw.dll(QABugs::Commands_11)
c:\install_local\CR30762_6-master-KGV\Windows-64-VC14-opt\OCCT\win64\vc14\bin\TKDraw.dll(Draw_Interpretor::AppendElement)
C:\occt-3rdparty\Windows-64-VC14\tcltk-86-64\bin\tcl86.dll(TclInvokeStringCommand)
C:\occt-3rdparty\Windows-64-VC14\tcltk-86-64\bin\tcl86.dll(TclNRRunCallbacks)
C:\occt-3rdparty\Windows-64-VC14\tcltk-86-64\bin\tcl86.dll(Tcl_RecordAndEvalObj)
C:\occt-3rdparty\Windows-64-VC14\tcltk-86-64\bin\tcl86.dll(Tcl_RecordAndEval)
c:\install_local\CR30762_6-master-KGV\Windows-64-VC14-opt\OCCT\win64\vc14\bin\TKDraw.dll(Draw_Interprete)
=============


Linux output sample:
OCC30762 
Test normal backtrace...

==Backtrace==
/dn62/install/CR30762_5-master-KGV/Debian80-64-opt/OCCT/lin64/gcc/lib/libTKQADraw.so(+0xc846d) [0x7fed3a8a046d]
/dn62/install/CR30762_5-master-KGV/Debian80-64-opt/OCCT/lin64/gcc/lib/libTKQADraw.so(+0xc856d) [0x7fed3a8a056d]
/dn62/install/CR30762_5-master-KGV/Debian80-64-opt/OCCT/lin64/gcc/lib/libTKQADraw.so(+0xccb1a) [0x7fed3a8a4b1a]
/dn62/install/CR30762_5-master-KGV/Debian80-64-opt/OCCT/lin64/gcc/lib/libTKDraw.so.7(+0x52e7b) [0x7fed49e93e7b]
/dn29/PRODUCTS/maintenance/opencascade-6.7.1/Debian80-64/tcltk-8.6.0/lib/libtcl8.6.so(TclInvokeStringCommand+0x74) [0x7fed433000c4]
/dn29/PRODUCTS/maintenance/opencascade-6.7.1/Debian80-64/tcltk-8.6.0/lib/libtcl8.6.so(TclNREvalObjv+0x6cb) [0x7fed43304e7b]
/dn29/PRODUCTS/maintenance/opencascade-6.7.1/Debian80-64/tcltk-8.6.0/lib/libtcl8.6.so(+0xb17a4) [0x7fed433797a4]
/dn29/PRODUCTS/maintenance/opencascade-6.7.1/Debian80-64/tcltk-8.6.0/lib/libtcl8.6.so(TclNRRunCallbacks+0x47) [0x7fed43305457]
/dn29/PRODUCTS/maintenance/opencascade-6.7.1/Debian80-64/tcltk-8.6.0/lib/libtcl8.6.so(Tcl_RecordAndEvalObj+0xf4) [0x7fed43386654]
/dn29/PRODUCTS/maintenance/opencascade-6.7.1/Debian80-64/tcltk-8.6.0/lib/libtcl8.6.so(Tcl_RecordAndEval+0x37) [0x7fed433867a7]
=============


WebAssembly output sample:
Test normal backtrace...

at __ZN8Standard10StackTraceEPciiPvi (occt-webgl-sample.js line 1693 > WebAssembly.instantiate:wasm-function[12152]:0x8e6ad0:0)
at __ZN11MyTestClass11testMethod3EPib (occt-webgl-sample.js line 1693 > WebAssembly.instantiate:wasm-function[1011]:0x14c178:0)
at __ZL15myTestFunction2Pib (occt-webgl-sample.js line 1693 > WebAssembly.instantiate:wasm-function[1001]:0x14bebe:0)
at __ZL15myTestFunction1b (occt-webgl-sample.js line 1693 > WebAssembly.instantiate:wasm-function[990]:0x14b493:0)
at __ZL8OCC30762v (occt-webgl-sample.js line 1693 > WebAssembly.instantiate:wasm-function[983]:0x14b254:0)
at _main (occt-webgl-sample.js line 1693 > WebAssembly.instantiate:wasm-function[974]:0x14afe0:0)
at Module._main (occt-webgl-sample.js:11990:33)
at callMain (occt-webgl-sample.js:12759:22)
at doRun (occt-webgl-sample.js:12818:31)
at run (occt-webgl-sample.js:12833:5)
at runCaller (occt-webgl-sample.js:12736:19)
at removeRunDependency (occt-webgl-sample.js:1553:7)
at receiveInstance (occt-webgl-sample.js:1670:24)
at receiveInstantiatedSource (occt-webgl-sample.js:1687:20)
TagsNo tags attached.
Test case numberbugs/fclasses/bug30762

Relationships

parent of 0032009 closedbugmaster Coding Rules, TKQADraw - suppress msvc10 compilation warning C4748 
parent of 0032437 closedkgv Coding Rules - eliminate MinGW warning -Wmaybe-uninitialized 

Activities

git

2019-06-03 08:06

administrator   ~0084766

Branch CR30762 has been created by kgv.

SHA-1: 5c24f60d5280069ab2c8f212a11c27648e8ab050


Detailed log of new commits:

Author: kgv
Date: Mon Jun 3 08:06:24 2019 +0300

    0030762: Foundation Classes - optionally include backtrace within dangerous exceptions like OSD_SIGSEGV

Author: kgv
Date: Thu May 30 10:02:25 2019 +0300

    0028668: Point Cloud Rendering - standard selection API returns invalid values
    
    Added an argument to OpenGl_GraphicDriver::GetSharedContext() for returning only currently bound OpenGL context.
    SelectMgr_SelectingVolumeManager::GetMousePosition() - added getter returning mouse coordinates.

git

2020-09-15 11:54

administrator   ~0094817

Branch CR30762_1 has been created by kgv.

SHA-1: 2c4e34ba95985071beb112884b929c29afc61982


Detailed log of new commits:

Author: kgv
Date: Mon Jun 3 08:06:24 2019 +0300

    0030762: Foundation Classes - include backtrace within OSD_SIGSEGV on Linux
    
    Added function Standard_Failure::BacktraceCat() appending backtrace to the string (implemented for Linux).
    SegvHandler within OSD_signal now appends backtrace to the message.

git

2020-09-15 12:05

administrator   ~0094820

Branch CR30762_1 has been updated forcibly by kgv.

SHA-1: 538c3292da35fcf5d747c589da34536c229f667f

kgv

2020-09-15 15:12

developer   ~0094840

Patch is ready for review
- OCCT branch: CR30762_1.

http://jenkins-test-12.nnov.opencascade.com:8080/view/CR30762_1-master-KGV

git

2020-09-16 00:02

administrator   ~0094892

Branch CR30762_2 has been created by kgv.

SHA-1: 76f46c9b23dadcc154177a7637750e35c10c1c4e


Detailed log of new commits:

Author: kgv
Date: Mon Jun 3 08:06:24 2019 +0300

    0030762: Foundation Classes - include backtrace within OSD_SIGSEGV on Linux
    
    Added function Standard_Failure::BacktraceCat() appending backtrace to the string (implemented for Linux).
    SegvHandler within OSD_signal now appends backtrace to the message.

abv

2020-10-05 08:50

manager   ~0095711

Some remarks:

0. Since stack trace functionality per-se is not related to exceptions, and it is never used within Standard package, it would be more logical to put function BacktraceCat into OSD package (e.g. as package method).
   Besides, the name "StackTrace..." would be more intuitive.

1. On Windows, BacktraceCat() is available only if OCCT is built with undocumented macro HAVE_DBGHELP.
   To make it useful, at least this macro shall be documented (see dox/debug/debug.md).
   To be more usable, I propose that it should be made always available (on both Linux and Windows).
   This can probably require dynamic loading of DbgHelp.dll, this is to be checked...

2. On Windows, calls to DbgHelp.dll should be protected by mutex to avoid possibility of contention in multithreaded scenarios.
   See documentation of DbgHelp.dll at https://docs.microsoft.com/en-us/windows/win32/debug/about-dbghelp

> Note that all DbgHelp functions are single threaded. Therefore, calls from more than one thread to this function will likely result in unexpected behavior or memory corruption. To avoid this, you must synchronize all concurrent calls from more than one thread to this function.

3. In Standard_Failure.hxx:

> //! This method relies on platform-dependent features and might be not implemented.

   It is not clear what "might be not implemented" means in practice.
   It is better to write explicitly: "if this feature is not available, the function will do nothing".
   Return success status instead of void would be helpful indeed.

4. Inclusion of stack trace info into the exception message would not always be needed.
   I propose that it should be triggered using environment variable (e.g. reusing existing CSF_DEBUG_MODE).

5. On Linux, as far as I know, signal handler is called within its own stack; that is why we have to use longjump and raise C++ exception from macro OCC_CATCH_SIGNALS on Linux.
   This means that stack trace generated in SegvHandler() would be meaningless (have you checked it?).
   I propose that generation of backtracebe moved to constructor of OSD_Exception - it will be equally useful on both Windows and Linux then.

6. Commit message is incomplete (mentions Linux only), please update.

git

2020-12-01 18:36

administrator   ~0097222

Branch CR30762_3 has been created by mzernova.

SHA-1: b9032353defc5213909f127fb9e025a3c0040182


Detailed log of new commits:

Author: mzernova
Date: Tue Nov 24 13:14:06 2020 +0300

    Implemented dynamic loading of DbgHelp.dll
    BacktraceCat function has been renamed and moved to OSD package.

Author: kgv
Date: Mon Jun 3 08:06:24 2019 +0300

    0030762: Foundation Classes - include backtrace within OSD_SIGSEGV on Linux
    
    Added function Standard_Failure::BacktraceCat() appending backtrace to the string (implemented for Linux).
    SegvHandler within OSD_signal now appends backtrace to the message.
    
    (cherry picked from commit 2bb8f4d3a266d8e308d35ecce0d9389c1cfe77c0)

kgv

2020-12-01 23:18

developer   ~0097227

+  OSD_Debug aDbgHelp;

This library is expected to be loaded once and globally accessed - hence should be defined as singleton.

+PVOID OSD_Debug::SymFunctionTableAccess (HANDLE hProcess, DWORD AddrBase)
+{
+  Standard_Mutex::Sentry aSentry (myMutex);

I would rather expect a global mutex to be locked once at start of OSD::StackTrace() instead of each individual function call to DbgHelp library.

+
+  // dbgHelp.dll functions
+  PFUNCTION_TABLE_ACCESS_ROUTINE64 symFunctionTableAccess64;
+  PGET_MODULE_BASE_ROUTINE64       symGetModuleBase64;
+  STACKWALK64PROC                  stackWalk64;
+  SYMCLEANUPPROC                   symCleanup;
+  SYMFROMADDRPROC                  symFromAddr;
+  SYMINITIALIZEPROC                symInitialize;
+
+private:
+
+  HMODULE myDbgHelpLib;

I don't think that OCCT should provide a public API as direct wrapper to DbgHelp library. I propose moving these details to .cxx and export the only useful utility OSD::StackTrace().

+#if defined(_WIN32) && defined(HAVE_DBGHELP)

Please remove HAVE_DBGHELP checks.

+    throw Standard_ProgramError ("OSD_Debug::loadDbgHelper(): Failed to load DbgHelp.dll");

It doesn't look useful throwing such exceptions on DbgHelp.dll unavailability or incompatibility - logging an error message will be more suitable.

git

2020-12-02 15:13

administrator   ~0097241

Branch CR30762_3 has been updated by mzernova.

SHA-1: be6e180fc6eb990a0cd5e60d61f1f5070f4e756c


Detailed log of new commits:

Author: mzernova
Date: Wed Dec 2 14:59:59 2020 +0300

    remarks from kgv

git

2020-12-02 15:13

administrator   ~0097242

Branch CR30762_4 has been created by mzernova.

SHA-1: bb1181025ff2ccca31a9fa106b0750fc398e04a1


Detailed log of new commits:

Author: kgv
Date: Mon Jun 3 08:06:24 2019 +0300

    0030762: Foundation Classes - include backtrace within OSD_SIGSEGV on Linux
    
    Implemented dynamic loading of DbgHelp.dll
    
    Added function OSD_Debug::StackTrace() appending backtrace to the string.
    SegvHandler within OSD_signal now appends backtrace to the message.

kgv

2020-12-02 15:42

developer   ~0097247

Please implement the forth remark of Andrey:
> 4. Inclusion of stack trace info into the exception message would not always be needed.
> I propose that it should be triggered using environment variable (e.g. reusing existing CSF_DEBUG_MODE).
CSF_DEBUG_MODE variable can be used to put backtrace into message box.
Please also extend OSD::SetSignal() with the new flag for including stacktrace into redirected access-violation exception message, disabled by default.

--- a/src/Standard/Standard_Failure.cxx
+++ b/src/Standard/Standard_Failure.cxx
...
+#ifndef _WIN32
+  #include <execinfo.h>
+#endif

Looks like an artifact.

+Standard_Boolean OSD_Debug::StackTrace (char* theBuffer,

Please move it back to OSD::StackTrace() and drop redundant OSD_Debug.hxx header (move internal structure definition to .cxx). OSD_StackTrace.cxx would look more appropriate than OSD_Debug.cxx.

+       Standard_Failure::BacktraceCat (aMsg, (int )sizeof(aMsg));

Seems it wouldn't compile on Linux.

git

2020-12-03 12:33

administrator   ~0097264

Branch CR30762_3 has been updated by mzernova.

SHA-1: 355e4ad9763c069e8322fadf53e49ed1a9f1ff00


Detailed log of new commits:

Author: mzernova
Date: Thu Dec 3 12:17:38 2020 +0300

    remarks from kgv

git

2020-12-03 12:33

administrator   ~0097265

Branch CR30762_4 has been updated forcibly by mzernova.

SHA-1: cf6ecd3a752819c8eae43f758da5d5db4f4ebe78

git

2020-12-03 12:51

administrator   ~0097266

Branch CR30762_4 has been updated forcibly by mzernova.

SHA-1: f9fe83e244be149410534cac059d666be0fab236

git

2020-12-03 12:51

administrator   ~0097267

Branch CR30762_3 has been updated forcibly by mzernova.

SHA-1: fc9471fdacfcac95773f8185496f485ff7d77fb0

git

2020-12-10 18:03

administrator   ~0097474

Branch CR30762_3 has been updated forcibly by mzernova.

SHA-1: 1780b5ce8b58cb395c2d3a2f9ee6e7a386b6d15e

git

2020-12-10 18:03

administrator   ~0097475

Branch CR30762_4 has been updated forcibly by mzernova.

SHA-1: 999e005d7e221b5c2f9ce6c92b3fb6fd64d71083

mzernova

2020-12-10 18:04

developer   ~0097476

http://jenkins-test-12.nnov.opencascade.com:8080/view/CR30762_4-master-mzernova

git

2020-12-10 18:25

administrator   ~0097477

Branch CR30762_4 has been updated forcibly by mzernova.

SHA-1: 68e9337137ac79f4c8a69eb7f7051aa1ecff88fb

git

2020-12-10 18:25

administrator   ~0097478

Branch CR30762_3 has been updated by mzernova.

SHA-1: 0181124823f59f06becfa20af6f10814bbe1bbdf


Detailed log of new commits:

Author: mzernova
Date: Thu Dec 10 18:24:59 2020 +0300

    update in SegvHandler

git

2020-12-11 15:53

administrator   ~0097488

Branch CR30762_5 has been created by kgv.

SHA-1: 0f04f0ae99d16bfb9d18734972f6e6011eded2b3


Detailed log of new commits:

Author: kgv
Date: Mon Jun 3 08:06:24 2019 +0300

    0030762: Foundation Classes - include backtrace within OSD_SIGSEGV on Linux
    
    Standard_Failure now holds an optional stack trace dump.
    Added function Standard::StackTrace() dumping backtrace to the string.
    SegvHandler within OSD_signal now appends backtrace to the message
    if OSD::SignalStackTraceLength() is set to non-zero value
    or environment variable "CSF_DEBUG_MODE" is set for debugging.
    
    Command "dsetsignal" has been extended by -strackTraceLength argument
    for defining stack trace length within signals redirected to C++ exceptions.
    Added "ddebugtraces" command for debugging purposes (adding stack traces to all exceptions).

git

2020-12-11 15:59

administrator   ~0097490

Branch CR30762_5 has been updated forcibly by kgv.

SHA-1: d5af43cfd3e10510e1b58f670a6ff51249c3395d

git

2020-12-11 16:11

administrator   ~0097492

Branch CR30762_5 has been updated forcibly by kgv.

SHA-1: c1ebdeedaf2636344968df001bce27048ad596fb

git

2020-12-11 16:17

administrator   ~0097493

Branch CR30762_5 has been updated forcibly by kgv.

SHA-1: fadf0a8b0bc49f782f82203bda01e8349be999d5

git

2020-12-11 16:43

administrator   ~0097494

Branch CR30762_5 has been updated forcibly by kgv.

SHA-1: 20ff425f2d4a2de795c939a53fd27390bf1f398c

git

2020-12-11 16:50

administrator   ~0097496

Branch CR30762_5 has been updated forcibly by kgv.

SHA-1: 860dedc9e01db3a992c36fe9bd2b3660143992fb

git

2020-12-11 17:09

administrator   ~0097497

Branch CR30762_5 has been updated forcibly by kgv.

SHA-1: fb782bdf3fa38259f168089300a1d33160e16311

git

2020-12-11 17:15

administrator   ~0097500

Branch CR30762_5 has been updated forcibly by kgv.

SHA-1: df5cd2e31eb009d76112525aebe4192c5695d132

git

2020-12-12 22:13

administrator   ~0097557

Branch CR30762_5 has been updated forcibly by kgv.

SHA-1: baf1e1ca2ce9b842a1593297fbf3bfe1f2de1a4b

git

2020-12-13 20:38

administrator   ~0097558

Branch CR30762_5 has been updated by kgv.

SHA-1: f7351a3c8f41d5fa5a6eca203209625e4a041102


Detailed log of new commits:

Author: kgv
Date: Sun Dec 13 20:39:19 2020 +0300

    # disable dump by default in Draw

git

2020-12-14 10:47

administrator   ~0097563

Branch CR30762_5 has been updated forcibly by kgv.

SHA-1: 96d0a0eff46291ee3cbb397fd68da1d2f5e34b12

git

2020-12-14 10:52

administrator   ~0097564

Branch CR30762_5 has been updated forcibly by kgv.

SHA-1: 83582110786264fbd0267597f8ea36dff990ec76

kgv

2020-12-14 12:04

developer   ~0097569

Please raise the patch
- OCCT branch: CR30762_5.

http://jenkins-test-12.nnov.opencascade.com:8080/view/CR30762_5-master-KGV2/

git

2020-12-15 12:30

administrator   ~0097607

Branch CR30762_5 has been updated by kgv.

SHA-1: d177cbdf118b9852ef5338b506fdbb44d7e2d922


Detailed log of new commits:

Author: kgv
Date: Tue Dec 15 12:31:05 2020 +0300

    # fix msvc10 errors and msvc 32-bit warnings

git

2020-12-15 12:45

administrator   ~0097608

Branch CR30762_5 has been updated by kgv.

SHA-1: 9a7da82e346fe648a23190b9d7109869b46ed807


Detailed log of new commits:

Author: kgv
Date: Tue Dec 15 12:46:05 2020 +0300

    # fix UWP build

git

2020-12-16 11:29

administrator   ~0097625

Branch CR30762_5 has been updated by kgv.

SHA-1: ab6688f5261d7553e66d8bcd04f72cc2b7446923


Detailed log of new commits:

Author: kgv
Date: Wed Dec 16 11:30:04 2020 +0300

    # fix compilcation on Android and UWP

git

2020-12-16 11:45

administrator   ~0097627

Branch CR30762_5 has been updated by kgv.

SHA-1: a836251b71befa4c73b0c92e4df5f95b801c8205


Detailed log of new commits:

Author: kgv
Date: Wed Dec 16 11:45:38 2020 +0300

    # mark test functions with __attribute__((noinline))

git

2020-12-16 12:12

administrator   ~0097633

Branch CR30762_5 has been updated by kgv.

SHA-1: 20c40adea4ace0508f572b141c3f2b76d432a555


Detailed log of new commits:

Author: kgv
Date: Wed Dec 16 12:12:46 2020 +0300

    # fix msvc compiler warnings

git

2020-12-16 12:14

administrator   ~0097634

Branch CR30762_6 has been created by kgv.

SHA-1: 7cd052f8e86ee8cdc45cc2d76c713d3119d1d134


Detailed log of new commits:

Author: kgv
Date: Mon Jun 3 08:06:24 2019 +0300

    0030762: Foundation Classes - include backtrace within OSD_SIGSEGV
    
    Standard_Failure now holds an optional stack trace dump.
    Added function Standard::StackTrace() dumping backtrace to the string.
    SegvHandler within OSD_signal now appends backtrace to the message
    if OSD::SignalStackTraceLength() is set to non-zero value
    or environment variable "CSF_DEBUG_MODE" is set for debugging.
    
    Added auxiliary macros Standard_NOINLINE disallowing function inlining.
    
    Command "dsetsignal" has been extended by -strackTraceLength argument
    for defining stack trace length within signals redirected to C++ exceptions.
    Added "ddebugtraces" command for debugging purposes (adding stack traces to all exceptions).

bugmaster

2020-12-19 14:49

administrator   ~0097748

Combination -
OCCT branch : IR-2020-12-18
master SHA - 04114fd201c20efe9fbe85f00bec9a99ae3747ad
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : IR-2020-12-18 SHA - 290e5c74e8fef71947cadf90acb8e43c81ed10a1
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:
Debian80-64:
OCCT
Total CPU difference: 17709.570000000054 / 17744.450000000124 [-0.20%]
Products
Total CPU difference: 12258.480000000121 / 12330.210000000125 [-0.58%]
Windows-64-VC14:
OCCT
Total CPU difference: 19272.796875 / 19429.1875 [-0.80%]
Products
Total CPU difference: 13712.859375 / 13755.5 [-0.31%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2020-12-19 15:22

administrator   ~0097773

Branch CR30762_6 has been deleted by inv.

SHA-1: 7cd052f8e86ee8cdc45cc2d76c713d3119d1d134

git

2020-12-19 15:22

administrator   ~0097774

Branch CR30762_5 has been deleted by inv.

SHA-1: 20c40adea4ace0508f572b141c3f2b76d432a555

git

2020-12-19 15:23

administrator   ~0097790

Branch CR30762_4 has been deleted by inv.

SHA-1: 68e9337137ac79f4c8a69eb7f7051aa1ecff88fb

git

2020-12-19 15:23

administrator   ~0097791

Branch CR30762_3 has been deleted by inv.

SHA-1: 0181124823f59f06becfa20af6f10814bbe1bbdf

git

2020-12-19 15:24

administrator   ~0097803

Branch CR30762_2 has been deleted by inv.

SHA-1: 76f46c9b23dadcc154177a7637750e35c10c1c4e

git

2020-12-19 15:24

administrator   ~0097804

Branch CR30762_1 has been deleted by inv.

SHA-1: 538c3292da35fcf5d747c589da34536c229f667f

git

2020-12-19 15:24

administrator   ~0097805

Branch CR30762 has been deleted by inv.

SHA-1: 5c24f60d5280069ab2c8f212a11c27648e8ab050

Related Changesets

occt: master 7fb9d6d5

2019-06-03 05:06:24

kgv


Committer: bugmaster Details Diff
0030762: Foundation Classes - include backtrace within OSD_SIGSEGV

Standard_Failure now holds an optional stack trace dump.
Added function Standard::StackTrace() dumping backtrace to the string.
SegvHandler within OSD_signal now appends backtrace to the message
if OSD::SignalStackTraceLength() is set to non-zero value
or environment variable "CSF_DEBUG_MODE" is set for debugging.

Added auxiliary macros Standard_NOINLINE disallowing function inlining.

Command "dsetsignal" has been extended by -strackTraceLength argument
for defining stack trace length within signals redirected to C++ exceptions.
Added "ddebugtraces" command for debugging purposes (adding stack traces to all exceptions).
Affected Issues
0030762
mod - src/Draw/Draw.cxx Diff File
mod - src/Draw/Draw_BasicCommands.cxx Diff File
mod - src/OSD/OSD.hxx Diff File
mod - src/OSD/OSD_signal.cxx Diff File
mod - src/OSD/OSD_ThreadPool.cxx Diff File
mod - src/QABugs/QABugs_11.cxx Diff File
mod - src/Standard/FILES Diff File
mod - src/Standard/Standard.hxx Diff File
mod - src/Standard/Standard_DefineException.hxx Diff File
mod - src/Standard/Standard_Failure.cxx Diff File
mod - src/Standard/Standard_Failure.hxx Diff File
mod - src/Standard/Standard_Macro.hxx Diff File
mod - src/Standard/Standard_OutOfMemory.cxx Diff File
mod - src/Standard/Standard_OutOfMemory.hxx Diff File
add - src/Standard/Standard_StackTrace.cxx Diff File
add - tests/bugs/fclasses/bug30762 Diff File

Issue History

Date Modified Username Field Change
2019-06-03 08:06 kgv New Issue
2019-06-03 08:06 kgv Assigned To => abv
2019-06-03 08:06 git Note Added: 0084766
2019-06-03 08:11 kgv Description Updated
2019-06-03 08:12 kgv Description Updated
2019-09-04 15:43 abv Target Version 7.4.0 => 7.5.0
2020-09-11 16:13 utverdov Target Version 7.5.0 => 7.6.0
2020-09-15 11:27 kgv Summary Foundation Classes - optionally include backtrace within dangerous exceptions like OSD_SIGSEGV => Foundation Classes - include backtrace within OSD_SIGSEGV on Linux
2020-09-15 11:54 git Note Added: 0094817
2020-09-15 12:05 git Note Added: 0094820
2020-09-15 15:12 kgv Note Added: 0094840
2020-09-15 15:12 kgv Status new => resolved
2020-09-15 15:12 kgv Target Version 7.6.0 => 7.5.0
2020-09-16 00:02 git Note Added: 0094892
2020-09-25 20:35 abv Target Version 7.5.0 => 7.6.0
2020-10-05 08:50 abv Note Added: 0095711
2020-10-05 08:50 abv Assigned To abv => kgv
2020-10-05 08:50 abv Status resolved => assigned
2020-11-16 12:43 kgv Assigned To kgv => mzernova
2020-12-01 18:36 git Note Added: 0097222
2020-12-01 18:37 mzernova Assigned To mzernova => kgv
2020-12-01 18:37 mzernova Status assigned => feedback
2020-12-01 23:18 kgv Note Added: 0097227
2020-12-01 23:20 kgv Assigned To kgv => mzernova
2020-12-01 23:20 kgv Status feedback => assigned
2020-12-02 15:13 git Note Added: 0097241
2020-12-02 15:13 git Note Added: 0097242
2020-12-02 15:15 mzernova Assigned To mzernova => kgv
2020-12-02 15:15 mzernova Status assigned => resolved
2020-12-02 15:15 mzernova Steps to Reproduce Updated
2020-12-02 15:42 kgv Note Added: 0097247
2020-12-02 15:42 kgv Assigned To kgv => mzernova
2020-12-02 15:42 kgv Status resolved => assigned
2020-12-03 12:33 git Note Added: 0097264
2020-12-03 12:33 git Note Added: 0097265
2020-12-03 12:51 git Note Added: 0097266
2020-12-03 12:51 git Note Added: 0097267
2020-12-03 13:39 mzernova Assigned To mzernova => kgv
2020-12-03 13:39 mzernova Status assigned => resolved
2020-12-03 14:32 mzernova Assigned To kgv => mzernova
2020-12-03 14:32 mzernova Status resolved => assigned
2020-12-10 18:03 git Note Added: 0097474
2020-12-10 18:03 git Note Added: 0097475
2020-12-10 18:04 mzernova Note Added: 0097476
2020-12-10 18:25 git Note Added: 0097477
2020-12-10 18:25 git Note Added: 0097478
2020-12-11 13:42 mzernova Assigned To mzernova => kgv
2020-12-11 13:42 mzernova Status assigned => resolved
2020-12-11 15:53 git Note Added: 0097488
2020-12-11 15:59 git Note Added: 0097490
2020-12-11 16:11 git Note Added: 0097492
2020-12-11 16:17 git Note Added: 0097493
2020-12-11 16:43 git Note Added: 0097494
2020-12-11 16:50 git Note Added: 0097496
2020-12-11 16:51 kgv Summary Foundation Classes - include backtrace within OSD_SIGSEGV on Linux => Foundation Classes - include backtrace within OSD_SIGSEGV
2020-12-11 17:09 git Note Added: 0097497
2020-12-11 17:15 git Note Added: 0097500
2020-12-12 22:13 git Note Added: 0097557
2020-12-13 20:38 git Note Added: 0097558
2020-12-14 10:47 git Note Added: 0097563
2020-12-14 10:52 git Note Added: 0097564
2020-12-14 12:04 kgv Note Added: 0097569
2020-12-14 12:04 kgv Assigned To kgv => bugmaster
2020-12-14 12:04 kgv Status resolved => reviewed
2020-12-15 12:30 git Note Added: 0097607
2020-12-15 12:45 git Note Added: 0097608
2020-12-16 11:29 git Note Added: 0097625
2020-12-16 11:45 git Note Added: 0097627
2020-12-16 12:12 git Note Added: 0097633
2020-12-16 12:14 git Note Added: 0097634
2020-12-16 14:00 kgv Additional Information Updated
2020-12-16 14:04 kgv Additional Information Updated
2020-12-16 14:05 kgv Additional Information Updated
2020-12-19 14:49 bugmaster Note Added: 0097748
2020-12-19 14:49 bugmaster Status reviewed => tested
2020-12-19 14:58 bugmaster Test case number => bugs/fclasses/bug30762
2020-12-19 15:06 bugmaster Changeset attached => occt master 7fb9d6d5
2020-12-19 15:06 bugmaster Status tested => verified
2020-12-19 15:06 bugmaster Resolution open => fixed
2020-12-19 15:22 git Note Added: 0097773
2020-12-19 15:22 git Note Added: 0097774
2020-12-19 15:23 git Note Added: 0097790
2020-12-19 15:23 git Note Added: 0097791
2020-12-19 15:24 git Note Added: 0097803
2020-12-19 15:24 git Note Added: 0097804
2020-12-19 15:24 git Note Added: 0097805
2020-12-19 15:43 kgv Relationship added parent of 0032009
2021-06-12 17:09 kgv Relationship added parent of 0032437