Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改xxx_fcontext名称 #294

Merged
merged 1 commit into from
Feb 2, 2024
Merged

Conversation

JanuarYJL
Copy link
Contributor

在使用时与其他库(比如libgo)一起链接,会遇到多个库引用不同版本boost fcontext的问题产生冲突导致程序崩溃,修改xxx_fcontext名称,避免与其他使用boost fcontext的库产生冲突

@ruanshudong
Copy link
Contributor

名字空间还区分不了么? 这个不建议修改, 修改以后, 同步这部分代码太难维护了.

@JanuarYJL
Copy link
Contributor Author

这个还是会同步boost的fcontext版本是吧?那我再看下是否有别的办法

@JanuarYJL
Copy link
Contributor Author

namespace确实无法区分,查了一下其他协程库,
比如阿里的async_simple
https://github.com/alibaba/async_simple/blob/main/async_simple/uthread/internal/Linux/x86_64/jump_x86_64_sysv_elf_gas.S
也是使用了boost的 fcontext,自行修改了xxx_fcontext的名称
是否可以考虑增加一个维护脚本 因为其实只需要执行一下sed即可:
find ./TarsCpp/util/src/asm -type f -exec sed -i 's/make_fcontext/tars_make_fcontext/g' {} +
find ./TarsCpp/util/src/asm -type f -exec sed -i 's/jump_fcontext/tars_jump_fcontext/g' {} +
find ./TarsCpp/util/src/asm -type f -exec sed -i 's/ontop_fcontext/tars_ontop_fcontext/g' {} +

@ruanshudong ruanshudong merged commit 7d892f2 into TarsCloud:master Feb 2, 2024
@JanuarYJL JanuarYJL deleted the merge_to_master branch April 24, 2024 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants