a) make sure the stack gets marked as non-executable b) add tss functions from threads.h
#include <threads.h> void* tss_get(tss_t tss_id) { return tss_id->data; }