[SDL] race condition in SDL_ThreadedTimerCheck?

Clifford T. Matthews ctm at ardi.com
Mon Jan 3 22:33:45 PST 2005

I have an application that uses SDL_SetTimer that dies on
Hyperthreaded P4s running Windows XP.  Looking at
SDL_ThreadedTimerCheck, I see this code:

			ms = t->cb(t->interval, t->param);

But without SDL_timer_mutex being held, can't the memory pointed to by
t be freed?  Shouldn't a copy of *t be made on the stack before the
lock is released and then that copy's cb, interval and param field be

--Cliff Matthews <ctm at ardi.com>

More information about the SDL mailing list