Software Archive
Read-only legacy content
17061 Discussions

error: tried to pass an SEH exception through a spawn

Daniel_Faken
Beginner
986 Views
Hi All,

Sometimes when running our cilk code one of my coworkers gets the title message and a crash:

error: tried to pass an SEH exception through a spawn

Can anyone suggest what might cause this or how to track it down? I've been assuming its a race condition, but per my other forum post I haven't had any success using cilkscreen.

We compile with /EHsc, not /EHa (or __try, __except, __finally - as mentioned by the cilk plus docs)

I haven't (yet) seen this on my Core 2 Duo system, but maybe thats because he has hyperthreading & I don't.

thanks,
Daniel Faken

0 Kudos
3 Replies
Barry_T_Intel
Employee
986 Views
This is saying that the exception handler that is used for Cilk functions is seeing an exception other than a C++ exception, which is illegal since we have no idea how to handle it.

If you can reproduce the problem, you can set the Visual Studio debugger to break when an exception is thrown which will allow you to determine what's happening. If I had to guess, I'd say that there's an access violation occurring that's propagating up.

What you might try is adding a catchall handler to your spawned function to at least report on any non-C++ exceptions.

I'll look at modifying the code to at least tell you what the exception ins.

- Barry

0 Kudos
Daniel_Faken
Beginner
986 Views
Barry,

OK, thank you for the explanation. We can't reliably reproduce it though, alas.

Daniel
0 Kudos
Brandon_H_Intel
Employee
986 Views
Hi Daniel,

I've seen this come up a couple times due to issues with the optimizer. Has your coworker ever seen it with a /Od or -O0 build?
0 Kudos
Reply