This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Anaconda: g++-7 -D_GLIBCXX_USE_CXX11_ABI=0 -Os -Wall -fPIC hack.cpp -c -o hack_abi_old.o | |
// Others: g++-7 -D_GLIBCXX_USE_CXX11_ABI=1 -Os -Wall -fPIC hack.cpp -c -o hack_abi_new.o | |
// Linker: g++-7 -fPIC -shared hack_abi_old.o hack_abi_new.o -o hack.so | |
// Strip: strip hack.so | |
// Use: export LD_PRELOAD=/absolute/path/to/hack.so # Before executing python | |
#include <atomic> | |
#include <string> | |
#include <random> | |
#include <stdint.h> |