Ignore:
Timestamp:
01/13/15 15:44:02 (6 years ago)
Author:
Richard Sanger <rsangerarj@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
b73407f
Parents:
4cc6e74
Message:

Fix rare threading bug in traceanon encryption by moving all globals in the library to TLS storage.
This doesn't seem to degrade performance and keeps DRD (valgrind) happy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/traceanon/ipenc.c

    ra8f2692 r925ae60  
    1919#endif
    2020
    21 static enum enc_type_t enc_type = ENC_NONE;
     21static __thread enum enc_type_t enc_type = ENC_NONE;
    2222
    2323static uint32_t masks[33] = {
     
    3131};
    3232
    33 static uint32_t prefix;
    34 static uint32_t netmask;
     33static __thread uint32_t prefix;
     34static __thread uint32_t netmask;
    3535static void init_prefix(const char *key)
    3636{
Note: See TracChangeset for help on using the changeset viewer.