On Thu, Sep 27, 2012 at 00:18, Alexey Suslikov wrote:
> On Wed, Sep 26, 2012 at 9:51 PM, Ted Unangst <t...@tedunangst.com> wrote:
>> On Wed, Sep 26, 2012 at 11:18, Alexey Suslikov wrote:
>>> Hi.
>>>
>>> Any news on that?
>>
>> Can we do it without the local variables for speed part?  I am not
>> interested in making this function faster.
>>
> 
> Removing only local variables part reverts us to previous
> behavior (i.e. crashes).
> 
> However, leaving current code as is but adding only local
> variables (see below) passes our test with no crashes.

If that's the case, then the locking wasn't done correctly.  Switching
to locals just means you're going to get weird results.


> I'm starting to believe that static globals are not good.

Well, no, but they're what we're stuck with.

As for Kannel, patching it to use rand_r may be a better solution.
That's the official "bad random number generator for threads" in posix.

Reply via email to