Ignore:
Timestamp:
01/13/15 15:44:02 (7 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/rijndael.c

    rc0a5a50 r925ae60  
    5050#include <string.h>
    5151
    52 static State     m_state;
    53 static Mode      m_mode;
    54 static Direction m_direction;
    55 static UINT8     m_initVector[MAX_IV_SIZE];
    56 static UINT32    m_uRounds;
    57 static UINT8     m_expandedKey[_MAX_ROUNDS+1][4][4];
    58 
     52static __thread State     m_state;
     53static __thread Mode      m_mode;
     54static __thread Direction m_direction;
     55static __thread UINT8     m_initVector[MAX_IV_SIZE];
     56static __thread UINT32    m_uRounds;
     57static __thread UINT8     m_expandedKey[_MAX_ROUNDS+1][4][4];
    5958
    6059static UINT8 S[256]=
Note: See TracChangeset for help on using the changeset viewer.