[ 
https://issues.apache.org/jira/browse/QPID-5487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kim van der Riet resolved QPID-5487.
------------------------------------

    Resolution: Fixed

Now uses 3 calls to rand() as follows:
{code}
((uint64_t)::rand() << 33) | ((uint64_t)::rand() << 2) | (::rand() & 0x3)
{code}
with the shift values and mask being calculated from the value of {{RAND_MAX}} 
(0x7fffffff, 31 bits).

> [linearstore] Replace use of /dev/urandom with c random generator calls
> -----------------------------------------------------------------------
>
>                 Key: QPID-5487
>                 URL: https://issues.apache.org/jira/browse/QPID-5487
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker
>            Reporter: Kim van der Riet
>            Assignee: Kim van der Riet
>            Priority: Minor
>
> The use of /dev/urandom for random numbers is considered unfriendly to other 
> systems on a machine that might depend upon this source.
> The current use-case is for Journal serial numbers; the randomness of the C 
> rand() call should be good enough, but it requires a 64-bit number. Construct 
> this using several smaller numbers from rand() or random()



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to