Shadow is a unique discrete-event network simulator that runs real applications like Tor, and distributed systems of thousands of nodes on a single machine. Shadow combines the accuracy of emulation with the efficiency and control of simulation, achieving the best of both approaches.
C Python CMake Other
Latest commit a552af9 Jan 6, 2018 @jtracey jtracey committed with robgjansen mark the main executable as using static TLS
To quote from the Drepper document on TLS:
  The TLS blocks for the executable itself and all the modules loaded at
  startup are located just below the address the thread pointer points to. This
  allows compilers to emit code which directly accesses this memory. Access to
  the TLS blocks is possible again through the dynamic thread vector, which has
  the same structure as in variant I, but also relative to the thread pointer
  with some offset which is fixed after the program starts. The offset of TLS
  data for the executable itself is even known at link-time.
    - Thread Local Storage v 0.21, p. 6. [0]
In other words, the main executable (and everything it's linked against) uses
static TLS, whether it marks the relevant flag or not. Somehow we all missed
this fact, and things only worked because we were running a main executable
with a tiny amount of TLS that didn't interfere with glibc's.

This patch fixes things in the sense that the main executable is now considered
to have the static TLS flag set, but still does not follow the actual
specification, as we still aren't treating all linked objects as having static
TLS. I'm not implementing the latter because 1. I can't concieve of a way the
linker would know it can assume the shared object will be linked and not loaded
without making use of the static TLS flag, and 2. This would add even more
memory to the already absurdly large static TLS allocation, and I'd like to
avoid that if possible.

[0] https://www.akkadia.org/drepper/tls.pdf

README.md

The Shadow Simulator

Shadow is a unique discrete-event network simulator that runs real applications like Tor and Bitcoin, and distributed systems of thousands of nodes on a single machine. Shadow combines the accuracy of emulation with the efficiency and control of simulation, achieving the best of both approaches.

Also included are simple Internet topologies and a core plug-in for generating traffic between nodes and through SOCKS proxies.

Quick Setup (installs everything in ~/.shadow):

$ ./setup build --clean --debug
$ ./setup install

Setup and Usage Instructions:

Bug Reports:

Email Support:

Shadow Plug-ins and Project Development:

Homepage:

Contributing

Contributions can be made by submitting pull requests via GitHub.