retrace is a versatile security vulnerability / bug discovery tool through monitoring and modifying the behavior of compiled binaries on Linux, OpenBSD/FreeBSD/NetBSD (shared object) and macOS (dynamic library).
#0 _thr_rtld_lock_release (lock=<value optimized out>) at /usr/src/lib/libthr/thread/thr_rtld.c:164
#1 0x00000008006059f3 in _rtld_bind (obj=0x800623c00, reloff=<value optimized out>) at /usr/src/libexec/rtld-elf/rtld.c:840
#2 0x000000080060269d in _rtld_bind_start () at /usr/src/libexec/rtld-elf/amd64/rtld_start.S:121
#3 0x0000000800d60c3b in popen (command=<value optimized out>, type=0x4008a4 "r") at /usr/src/lib/libc/gen/popen.c:162
#4 0x0000000000400828 in main () at popen.c:5
the popen tests is crashing in FreeBSD. I tested this in FreeBSD 11.2-RELEASE #0 r335510 using this:
LD_PRELOAD=.libs/libretrace_v2.so ../../test/popen