mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fix undefined behaviour caused by uncaught exceptions in OMP section
An OpenMP parallel section must have a single entry and a single point of exit. Leaving such a section by throwing an exception is undefined. This patch fixes this by catching possible exceptions on the parallel section and throwing right we left it.
This commit is contained in:
@@ -109,5 +109,7 @@ void memoryleak()
|
||||
|
||||
void test_exceptions()
|
||||
{
|
||||
CALL_SUBTEST( memoryleak() );
|
||||
EIGEN_TRY {
|
||||
CALL_SUBTEST( memoryleak() );
|
||||
} EIGEN_CATCH(...) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user