Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/62.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
glibc中的dlopen错误_C_Valgrind_Glibc_Dlopen - Fatal编程技术网

glibc中的dlopen错误

glibc中的dlopen错误,c,valgrind,glibc,dlopen,C,Valgrind,Glibc,Dlopen,我正在尝试调试dlopen的一个问题,该问题在随机时间发生 我没有这个问题的复制机。基本上,当我在valgrind下运行一个可执行文件时,我偶尔会遇到这个错误 my_file.cxx 第342行:void*h=dlopen(“libstream.so”,RTLD_GLOBAL | RTLD_NOW) 我认为这是一个可能的原因 谢谢偶尔出现错误肯定表明程序正在执行某些未定义的行为。发布的代码行是正确的,所以问题出在代码的其他地方。您是否能够用最少的程序重现这一点?我自己也看到过类似的错误。你安装

我正在尝试调试dlopen的一个问题,该问题在随机时间发生

我没有这个问题的复制机。基本上,当我在valgrind下运行一个可执行文件时,我偶尔会遇到这个错误

my_file.cxx

第342行:void*h=dlopen(“libstream.so”,RTLD_GLOBAL | RTLD_NOW)

我认为这是一个可能的原因


谢谢

偶尔出现错误肯定表明程序正在执行某些未定义的行为。发布的代码行是正确的,所以问题出在代码的其他地方。您是否能够用最少的程序重现这一点?我自己也看到过类似的错误。你安装了什么版本的ld?我没有复印机。ld版本2.20.51.0.2-5.42.el6 20100205I在执行跟踪的行号上出现了相同的错误。它是如何在程序集文件中出错的!它看起来确实像Glibc2.12中的一个bug
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