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

idle-close.cc 按Ctrl+c停止服务会coredump #83

Open
18801433136 opened this issue Sep 4, 2020 · 1 comment
Open

idle-close.cc 按Ctrl+c停止服务会coredump #83

18801433136 opened this issue Sep 4, 2020 · 1 comment

Comments

@18801433136
Copy link

EventsImp::loop函数中,先行调用idleConns_.clear()清除掉空闲链接,lst地址已释放。
然后调用函数
void EventsImp::unregisterIdle(const IdleId &id) {
trace("unregister idle");
id->lst_->erase(id->iter_);
}
IdleId的构造依赖于lst的地址 IdleId(new IdleIdImp(&lst, --lst.end()));, 此时调用unregisterIdle指向的是非法指针

@yedf2
Copy link
Owner

yedf2 commented Jun 18, 2021

能够给出复现的步骤吗?

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

No branches or pull requests

2 participants