pthread_cond_broadcast broken with dlsym?

一笑奈何 提交于 2019-12-05 10:02:57
jpa

The call through your function seems to end up in a different version of the function:

With LD_PRELOAD:    __pthread_cond_broadcast_2_0 (cond=0x804a060) at old_pthread_cond_broadcast.c:37
Without LD_PRELOAD: pthread_cond_broadcast@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_broadcast.S:39

So your situation is similar to this question, i.e. you are getting incompatible versions of pthread functions: symbol versioning and dlsym

This page gives one way to solve the problem, though a bit complex: http://blog.fesnel.com/blog/2009/08/25/preloading-with-multiple-symbol-versions/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!