On Tue, Sep 18, 2012 at 19:40, Alexey Suslikov wrote:

> This one being discovered by Roman Kravchuk using Kannel port (see
> https://github.com/jasperla/openbsd-wip/tree/master/net/kannel).
> 
> While stress testing, Kannel components die with
> 
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to thread 1006387]
> 0x00000cb33345cf6e in random () at /usr/src/lib/libc/stdlib/random.c:387
> 387                     *fptr += *rptr;
> 
> We suspect threading issue because of the following trace:

> Is it normal to not have a mutex protected *random in OpenBSD?

No, according to posix it should be thread safe.  I don't know why,
since rand() is one of the exempted functions, but random() is not.
Standards gods are capricious gods.

Reply via email to