[Bug] Fix Backend UT Problem (#5784) (#5785)

1. relocation R_X86_64_32 against `__gxx_personality_v0' can not be used when making a shared object; recompile with -fPIC
2. warning: the use of `tmpnam' is dangerous, better use `mkstemp'
3. Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads.
This commit is contained in:
HappenLee
2021-05-16 22:51:59 -05:00
committed by GitHub
parent 00a60ae5bb
commit d0462f4383
3 changed files with 4 additions and 2 deletions

View File

@ -96,7 +96,7 @@ public:
hostname = "http://127.0.0.1:" + std::to_string(real_port);
// compile code to so
system("g++ -shared ./be/test/runtime/test_data/user_function_cache/lib/my_add.cc -o "
system("g++ -shared -fPIC ./be/test/runtime/test_data/user_function_cache/lib/my_add.cc -o "
"./be/test/runtime/test_data/user_function_cache/lib/my_add.so");
my_add_md5sum =