Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: solved: segment faults from osdtelext plugin



syphir@syphir.sytes.net(C.Y.M)  04.12.04 09:31

Once upon a time "C.Y.M " shaped the electrons to say...

>Rainer Zocholl wrote:
>>
>> After replacing all obviously/known not thread save clib calls
>> with their thread save counterparts osdteletext now runs!
>>
>> I would not waste any time to investigate which of those
>> calls are the minimum or why the seg faults are caused in detail.
>> There is no adavantage using non-thread save functions in a
>> multithreaded environment. The overhead is neglectable.

>Excellent work, Rainer. :)

I hope.
at least osdteletext is happy now ;-)



>I looked but I couldnt find any of the said thread "unsafe" calls in
>streamdev.

I don't know if i catch all.
Too there might be not so obvious violations.

Generally:
Every global "variables" are suspect ;-)
Pay attention to global vars to be protected by a 
global mutex and not only by local one.
Take care of pointers between threads.
Use the "volatile" attribute on thread synchronisations flags.

Too any local variables which have a 
"static" attribute need deeper investigation.




>The only thing I see is this (but it looks like its ok).
>Maybe just patching vdr will do the trick.. I will let you know.
>Thanks!

>client/remote.c:        struct tm *time = localtime_r(&tstart, &tm_r);
>client/remote.c:        struct tm *time = localtime_r(&tstart, &tm_r);

That's Ok.
that's why i did 
"grep localtime *.c | grep -v localtime_r"

Try to patch. The changes should be benign.


But as wrote in the other mail:
The problem with recordings is not solved by that hack.


Rainer





Home | Main Index | Thread Index