Closed speed47 closed 6 years ago
Good catch! Thanks
/usr/bin/ld: CMakeFiles/SpeedTest.dir/SpeedTestClient.cpp.o: in function `SpeedTestClient::mkSocket()': SpeedTestClient.cpp:(.text+0xa58): warning: Using 'gethostbyname_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
Replace the use of the non-reentrant gethostbyname() function by the thread-safe gethostbyname_r() one. Those segfaults are more likely to happen with a high number of threads, which is the case when testing high-bandwidth connections.
This is also dependent on the libc/compiler, as the program started to segfault ~100% of the time when attempting to test a Fiber connection with the program compiled under gcc7 where the same program compiled under gcc5 was segfaulting only ~%5 of the time.