[vlc-devel] Uho! strerror...

Rémi Denis-Courmont rem at videolan.org
Mon Sep 17 20:21:31 CEST 2007


	Dudes,

It would seem that strerror() is not thread-safe (at least on Linux with glibc 
2.6), and this is actually causing time-dependant crashes from inside 
gettext. At first, I thought Qt4 was messing around, but I have now cleared 
it.

From a quick grep, there are about 168 places where we use strerror() inside 
VLC! We can either:
- ignore the problem - bad,
- print errno value instead of a string - bad,
- change them to use a custom vlc_strerror() - ugly and not portable,
- change them to use strerror_r() - boring and maybe not portable,
- change them to a vlc_strerror that returns predefined static strings
  - boring and ignorant of localization.

As you can see, that's going to be very fun. But don't hold your breath - the 
real fun will be fixing the underlying libraries (e.g. live), especially 
since we do not have use rcontrib on Linux. Now, that looks really fun.

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list