[vdr] vdr 1.3.25 thread problems

Darren Salt linux at youmustbejoking.demon.co.uk
Wed Jun 1 21:28:24 CEST 2005


I demand that Rainer Zocholl may or may not have written...

> Again:
> The most beloved problem: Reentrancy...

> This C-Function in tools.c looks suspicious:

> cString TimeToString(time_t t)
> {
>   char buffer[32];
>   if (ctime_r(&t, buffer)) {
>      buffer[strlen(buffer) - 1] = 0; // strip trailing newline
>      return buffer;
>      }
>   return "???";
> }

That's harmless.

Those return statements are effectively 'return cString (<string>, false)',
and the cString constructor will call strdup() if its second parameter is
false (and note that that parameter is declared as having a default value).

[snip]
> Having a deja vue: I thought all that was "overworked" with the
> "thread-save" patches 3 month ago?

It was exhausted, it hasn't recovered, and no threads were saved. ;-)

-- 
| Darren Salt | nr. Ashington, | d youmustbejoking,demon,co,uk
| Debian,     | Northumberland | s zap,tartarus,org
| RISC OS     | Toon Army      | @
|   Retrocomputing: a PC card in a Risc PC

Smokey the Borg: "Only *you* can prevent futility."



More information about the vdr mailing list