Hi, I'm trying to catch a Region_conflict exception from a call to env()->rm_ression()->attach(...). By putting printfs in the Genode code I see the exception is being thrown in the rm-session-component, but it does not seem to be getting propagated back to the client app.
Can someone check the new GENODE_RPC_THROW macro is working correctly? Fiasco.OC x86_32.
Thanks Daniel
Hi Daniel,
I'm trying to catch a Region_conflict exception from a call to env()->rm_ression()->attach(...). By putting printfs in the Genode code I see the exception is being thrown in the rm-session-component, but it does not seem to be getting propagated back to the client app.
Can someone check the new GENODE_RPC_THROW macro is working correctly? Fiasco.OC x86_32.
we have observed such a problem before - in a scenario where the first exception was thrown by a thread other than the main thread. Is this the case in your scenario? I.e., is the 'rm_session()->attach()' called from a non-main thread?
If so, the problem here might be that the first 'throw' triggers the lazy initialization of the exception support in gcc's libsupc++. This initialization involves dynamic memory allocation via 'malloc', which tends to consume significant amount of stack space (several KB). There are two ways to remedy this issue: to trigger the first exception at a well-defined place by a thread with a large enough stack (-> the main thread), or increasing the stack size of any thread that might trigger the very first exception. I would go for the first idea. Could you please try to add the following line right after the 'init_exception_handling()' call at the startup code at 'base/src/platform/_main.cc':
try { throw 1; } catch (...) { }
If your scenario is different, could you please supply us with a code snippet that triggers the issue? This would be greatly appreciated.
Best regards, Norman
Hi Daniel,
currently, we're investigating an issue with exception handling and dynamically linked binaries. I expect this fixed until Monday. Also, I attached my simple test program and wonder if it reflects your use case. Mind the comment in target.mk.
Greets