[SDL] What are threads allowed to do?

David Olofson david at olofson.net
Sun Jan 23 12:05:38 PST 2005


On Sunday 23 January 2005 20.22, Clemens Kirchgatterer wrote:
> Albert Cahalan <albert at users.sf.net> wrote:
> > Well, there is a known memory corruption bug in libSDL_ttf
> > involving italic fonts. It normally doesn't cause trouble,
> > but maybe the altered memory layout of the threaded solution
> > (different stack location, etc.) made the problem worse.
> > Perhaps Tux Paint even has a similar problem, though it
> > tolerates linking with Electric Fence (a malloc bounds checker)
> > just fine.
>
> have you ever tried with valgrind? has already safed my live once
> or twice. :)

Great idea! Highly recommended.

I've only used Valgrind for a year or so, and it's already saved me 
countless hours of boring, frustrating bug hunting. Most of the time 
it leads you right at the bugs, and when it doesn't, it usually says 
*something* where you'd normally have a sleeping bug waiting to bite 
you in the *ss way down the road.

That, all warnings enabled in the compiler, and a habit of writing 
code in ways that tend to generate bugs that are easy to trap with 
these tools, can increase productivity and lower frustration levels a 
great deal. :-)


//David Olofson - Programmer, Composer, Open Source Advocate

.- Audiality -----------------------------------------------.
|  Free/Open Source audio engine for games and multimedia.  |
| MIDI, modular synthesis, real time effects, scripting,... |
`-----------------------------------> http://audiality.org -'
   --- http://olofson.net --- http://www.reologica.se ---




More information about the SDL mailing list