>
> I have implemented this change here already but not yet checked in. For my 
> suprise tntnet is able to catch a exception in both cases. Look like gcc (or 
> glibc - I don't know, who is responsible for this) have fixed that bug.
>
> Tommi
>   
The exception handling appears to have been fixed quite a while ago, and 
has remained resolved through several updates of gcc/glibc. 
Unfortunately I have no idea when it was resolved or if it was a fix to 
the compiler or std lib.

> So users will be able to choose even per library, which loading mechanism to 
> use. Tntnet has already this catch(...)-case.

While the "!" solution will give flexibility for those who require 
RTLD_GLOBAL behaviour, it would be best to default to RTLD_LOCAL for 
both consistency and safety reasons unless the user chooses otherwise. 
Normally, C++ is always defaulted to RTLD_LOCAL (or equivalent across 
platforms), therefore RTLD_LOCAL is the expected behaviour unless one 
takes the effort to make it behave differently. Using RTLD_GLOBAL as a 
default setting is inherently dangerous, especially for those who don't 
fully understand what this flag does and what the potential problems are 
with using it - the bugs you can get are very nasty, and if you are 
unaware of the issue, the reason for the bugs can be very difficult to 
figure out.

In our case I'm comfortable with either setting as a default because I'm 
fully aware of the situation, however other users who are expecting the 
usual default RTLD_LOCAL behaviour may run into the same problems we 
had, and this may result in people considering other solutions if they 
cannot resolve the problem quickly.

Whatever you decide to do, I suggest that you update the documentation 
to make this issue very clear to your users, and also put a note in the 
tntnet.conf file since new tntnet users will probably not fully 
understand the situation even if they read the whole manual.

I'm looking forward to having this resolved.

Thanks!

Robert


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general

Reply via email to