On Wed, Oct 9, 2013 at 10:22 PM, Georg Baum
<georg.b...@post.rwth-aachen.de>wrote:

> Enrico Forestieri wrote:
>
> > On Tue, Oct 08, 2013 at 09:49:44PM +0200, Vincent van Ravesteijn wrote:
> >>
> >> I tried to use QThreadStorage, which works on Windows, but on Linux
> >> I keep getting segmentation faults.
>
> Vincent, I extended your patch to protect all IconvProcessor instances.
> Thanks to Enricos documentation links I am now also sure that the mutex in
> convert() is not needed, so I removed it. Using thread-local storage has
> also the advantage that we can share one IconvProcessor instance per thread
> for each encoding pair. I believe that this patch makes all iconv
> conversions 100% thread-safe. I did not see any segfault on Debian Wheezy,
> and I could not get any wrong conversion. What do others think?
>
> This patch works for me as well now.

Vincent

Reply via email to