Skip to content
Snippets Groups Projects
  • Nadav Har'El's avatar
    01576ce6
    Test unhandled exception · 01576ce6
    Nadav Har'El authored
    
    Commit 7fc023e8 fixed issue #64, and
    made unhandled exceptions work correctly.
    
    This patch adds a test to tst-except.cc to test this - that an unhandled
    exception really does call the custom termination handler that the C++
    standard allows to set (before the above commit, this test would hang).
    
    Unfortunately, gcc's libsupc++ tries very hard to ensure that the
    terminination handler really does abort - if the handler returns, or
    throws an exception, the library nevertheless aborts. So we need to
    trick it with an ugly longjmp to make this test be able to complete
    without aborting the system.
    
    Signed-off-by: default avatarNadav Har'El <nyh@cloudius-systems.com>
    01576ce6
    History
    Test unhandled exception
    Nadav Har'El authored
    
    Commit 7fc023e8 fixed issue #64, and
    made unhandled exceptions work correctly.
    
    This patch adds a test to tst-except.cc to test this - that an unhandled
    exception really does call the custom termination handler that the C++
    standard allows to set (before the above commit, this test would hang).
    
    Unfortunately, gcc's libsupc++ tries very hard to ensure that the
    terminination handler really does abort - if the handler returns, or
    throws an exception, the library nevertheless aborts. So we need to
    trick it with an ugly longjmp to make this test be able to complete
    without aborting the system.
    
    Signed-off-by: default avatarNadav Har'El <nyh@cloudius-systems.com>