Skip to contentSkip to conversation

rte_rand() is not thread-safe but not documented as such

Bug 114 [email protected] 1 participant 2 messages Nov 30, 2018 – Jun 30, 2019

lore
Share & tools
lore
#0 lore raw

https://bugs.dpdk.org/show_bug.cgi?id=114

            Bug ID: 114
           Summary: rte_rand() is not thread-safe but not documented as
                    such
           Product: DPDK
           Version: 18.11
          Hardware: All
                OS: All
            Status: CONFIRMED
          Severity: minor
          Priority: Normal
         Component: core
          Assignee: [email protected]
          Reporter: [email protected]

Target Milestone: ---

rte_rand() is implemented by means of lrand48() libc calls. This function is not thread safe, and besides any implications on correctness this might have for parallel applications, the global state will also hurt performance.

Either rte_rand() should be documented as non-thread safe, or it should - if possible - be implemented with lrand48_r() instead of its unsafe cousin.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.
#1 lore raw

https://bugs.dpdk.org/show_bug.cgi?id=114

Mattias Rönnblom ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

         Resolution|---                         |FIXED
             Status|CONFIRMED                   |RESOLVED
   Target Milestone|---                         |19.08

--- Comment #1 from Mattias Rönnblom ([email protected]) --- Fixed by commit 3f002f06961262667694171c20cb3443be6017c1.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.