Re: [AD] Patch to fix race condition

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sun, February 28, 2010 9:43 pm, Evert Glebbeek said:
> I didn't read this very carefully, but is this similar to the issue on OS X I fixed a short while
> back, where trying to set errno (because allegro.cfg isn't found) before TLS was initialised
> caused some memory corruption (due to an invalid TLS being read back) that sometimes lead to a
> crash later on?
> I fixed that by calling the TLS initialisation routine in the system driver before anything else.
> There's even a CMake option for it (which was already there).

Yes, it's exactly like that. Setting ALLEGRO_CFG_PTHREADS_TLS=1 in the iPhone xcode project
fixes it too. This is probably the best of all the solutions so I will probably commit it.

Trent :{)>




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/