Open AKanTam opened 5 months ago
环境一: windows10 22H2 环境二: arm32 ubuntu 20.04 环境三: amd64 ubuntu 16.04
动态库链接libco.a后在linux系统环境下无法被动态加载,而在windows平台中使用正常
以下是Linux中gdb的报错信息:
coost/src/co/hook.cc:1248: void co::init_hook(): Assertion `__sys_api(close)' failed.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 50 ../sysdeps/unix/sysv/linux/raise.c: 没有那个文件或目录. (gdb) bt
fmt=0x7ffff7d51588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x7fff65268ece "__sys_api(close)", file=0x7fff65269068 "/home/alientek/dev_assist/coost/src/co/hook.cc", line=1248, function=<optimized out>) at assert.c:92
assertion=assertion@entry=0x7fff65268ece "__sys_api(close)", file=file@entry=0x7fff65269068 "/home/alientek/dev_assist/coost/src/co/hook.cc", line=line@entry=1248, function=function@entry=0x7fff65268eb9 "void co::init_hook()") at assert.c:101
at /home/alientek/dev_assist/coost/src/co/hook.cc:1256
this=<optimized out>) at /home/alientek/dev_assist/coost/src/co/hook.cc:1274
at /home/alientek/dev_assist/coost/src/co/hook.cc:1271
__initialize_p=1, __priority=65535) at /home/alientek/dev_assist/coost/src/co/co.cc:1087
--Type for more, q to quit, c to continue without paging--
有解决方案吗,这是什么问题?
环境一: windows10 22H2 环境二: arm32 ubuntu 20.04 环境三: amd64 ubuntu 16.04
动态库链接libco.a后在linux系统环境下无法被动态加载,而在windows平台中使用正常
以下是Linux中gdb的报错信息:
coost/src/co/hook.cc:1248: void co::init_hook(): Assertion `__sys_api(close)' failed.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 50 ../sysdeps/unix/sysv/linux/raise.c: 没有那个文件或目录. (gdb) bt
0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
1 0x00007ffff7bbb859 in __GI_abort () at abort.c:79
2 0x00007ffff7bbb729 in __assert_fail_base (
3 0x00007ffff7bccfd6 in __GI___assert_fail (
4 0x00007fff65227748 in co::init_hook ()
5 0x00007fff65227905 in HookInitializer::HookInitializer (
6 HookInitializer::HookInitializer (this=)
7 0x00007fff651deb22 in __static_initialization_and_destruction_0 (
--Type for more, q to quit, c to continue without paging--
8 _GLOBAL__sub_I_co.cc(void) () at /home/alientek/dev_assist/coost/src/co/co.cc:1087
9 0x00007ffff7fe0b9a in call_init (l=, argc=argc@entry=1, argv=argv@entry=0x7fffffffe058, env=env@entry=0x7fffffffe068) at dl-init.c:72
10 0x00007ffff7fe0ca1 in call_init (env=0x7fffffffe068, argv=0x7fffffffe058, argc=1, l=) at dl-init.c:30
11 _dl_init (main_map=0x55555585a860, argc=1, argv=0x7fffffffe058, env=0x7fffffffe068) at dl-init.c:119
12 0x00007ffff7cf9ba5 in GIdl_catch_exception (exception=, operate=, args=) at dl-error-skeleton.c:182
13 0x00007ffff7fe50cf in dl_open_worker (a=a@entry=0x7fffffffd8d0) at dl-open.c:758
14 0x00007ffff7cf9b48 in GIdl_catch_exception (exception=, operate=, args=) at dl-error-skeleton.c:208
15 0x00007ffff7fe460a in _dl_open (file=0x555555827d80 "/home/alientek/smu/bin/libprotocol_ibdn.so", mode=-2147483647, caller_dlopen=, nsid=-2, argc=1, argv=0x7fffffffe058, env=0x7fffffffe068) at dl-open.c:837
16 0x00007ffff7fac34c in dlopen_doit (a=a@entry=0x7fffffffdaf0) at dlopen.c:66
17 0x00007ffff7cf9b48 in GIdl_catch_exception (exception=exception@entry=0x7fffffffda90, operate=, args=) at dl-error-skeleton.c:208
18 0x00007ffff7cf9c13 in GIdl_catch_error (objname=0x5555558002a0, errstring=0x5555558002a8, mallocedp=0x555555800298, operate=, args=) at dl-error-skeleton.c:227
19 0x00007ffff7facb59 in _dlerror_run (operate=operate@entry=0x7ffff7fac2f0, args=args@entry=0x7fffffffdaf0) at dlerror.c:170
20 0x00007ffff7fac3da in __dlopen (file=, mode=) at dlopen.c:87