Handling CPU exceptions in C++ -
is there cross-platform way handle cpu exceptions segmentation faults, or division zero? lets say, need call potentially unsafe functions (for example plug-in file), can cause segfault, or other problems cannot test before execute it. know, c standard library has signal handling functions, don't know how use them handle problem avoid program termination (i guess, can't jump location before problematic functions execution, or can i?). under windows use seh exception handlers, can't under linux, or other os. using own exception handler handle these problems, how different between windows/linux? possible (via assembler - lets on x86 platform)?
i'm asking out of curiosity, i'm not trying solve existing problem (yet). thanks
libsigsegv cross-platform library handling segmentation faults , stack overflows. however, in vast majority of cases, when detect segmentation fault, right thing terminate execution fast possible instead of trying recover it. segfault indicative of bug or corrupted memory, , once have corrupted memory, it's virtually impossible recover that.
Comments
Post a Comment