我正在尝试使用随机时间发生的dlopen调试问题。
我没有针对此问题的复制品。基本上当我在 valgrind 下运行可执行文件时,偶尔会出现此错误。
my_file.cxx
line 342: void* h = dlopen( "libstream.so", RTLD_GLOBAL | RTLD_NOW);
Invalid write of size 2
at 0x3F4B0184CE: mempcpy (memcpy.S:79)
by 0x3F4B0059F9: open_path (dl-load.c:1866)
by 0x3F4B00871B: _dl_map_object (dl-load.c:2086)
by 0x3F4B00C381: openaux (dl-deps.c:65)
by 0x3F4B00E265: _dl_catch_error (dl-error.c:178)
by 0x3F4B00CA64: _dl_map_object_deps (dl-deps.c:247)
by 0x3F4B012B61: dl_open_worker (dl-open.c:268)
by 0x3F4B00E265: _dl_catch_error (dl-error.c:178)
by 0x3F4B0125A9: _dl_open (dl-open.c:587)
by 0x3F4C000F65: dlopen_doit (dlopen.c:67)
by 0x3F4B00E265: _dl_catch_error (dl-error.c:178)
by 0x3F4C00129B: _dlerror_run (dlerror.c:164)
Address 0x7fefccf50 is on thread 1's stack
Syscall param open(filename) points to unaddressable byte(s)
at 0x3F4B016EB7: open (syscall-template.S:82)
by 0x3F4B00542F: open_verify (dl-load.c:1638)
by 0x3F4B005ADA: open_path (dl-load.c:1883)
by 0x3F4B00871B: _dl_map_object (dl-load.c:2086)
by 0x3F4B00C381: openaux (dl-deps.c:65)
by 0x3F4B00E265: _dl_catch_error (dl-error.c:178)
by 0x3F4B00CA64: _dl_map_object_deps (dl-deps.c:247)
by 0x3F4B012B61: dl_open_worker (dl-open.c:268)
by 0x3F4B00E265: _dl_catch_error (dl-error.c:178)
by 0x3F4B0125A9: _dl_open (dl-open.c:587)
by 0x3F4C000F65: dlopen_doit (dlopen.c:67)
by 0x3F4B00E265: _dl_catch_error (dl-error.c:178)
Address 0x7fefccf50 is on thread 1's stack
Invalid write of size 1
at 0x3F4B0184BE: mempcpy (memcpy.S:67)
by 0x3F4B0059F9: open_path (dl-load.c:1866)
by 0x3F4B00871B: _dl_map_object (dl-load.c:2086)
by 0x3F4B00C381: openaux (dl-deps.c:65)
by 0x3F4B00E265: _dl_catch_error (dl-error.c:178)
by 0x3F4B00CA64: _dl_map_object_deps (dl-deps.c:247)
by 0x3F4B012B61: dl_open_worker (dl-open.c:268)
by 0x3F4B00E265: _dl_catch_error (dl-error.c:178)
by 0x3F4B0125A9: _dl_open (dl-open.c:587)
by 0x3F4C000F65: dlopen_doit (dlopen.c:67)
by 0x3F4B00E265: _dl_catch_error (dl-error.c:178)
by 0x3F4C00129B: _dlerror_run (dlerror.c:164)
Address 0x7fefccf50 is on thread 1's stack
我认为这是一个可能的原因 https://sourceware.org/bugzilla/show_bug.cgi?id=13618
由于