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

fix: nullptr error caused by failed HttpHandler::SwitchHTTP2()(#560). #561

Merged
merged 3 commits into from
May 31, 2024

Conversation

SuperBigYB
Copy link
Contributor

@SuperBigYB SuperBigYB commented May 31, 2024

fix #560

@House-Men
Copy link
Contributor

标准库的智能指针有运算符重载 parser==NULL 和 parser.get() == nullptr是一样的,只不过前者非推荐写法不排除某些环境原因出现问题,不过如果对方的编译运行环境因这个写法产生问题那么可不止这一处地方需要改,还有许多地方有类似这样的写法。
我用clang17在windows/vc14和linux(uos20)/gnu8.3环境下用对应issue中提到的复现方法测试并无问题。

@SuperBigYB
Copy link
Contributor Author

标准库的智能指针有运算符重载 parser==NULL 和 parser.get() == nullptr是一样的,只不过前者非推荐写法不排除某些环境原因出现问题,不过如果对方的编译运行环境因这个写法产生问题那么可不止这一处地方需要改,还有许多地方有类似这样的写法。 我用clang17在windows/vc14和linux(uos20)/gnu8.3环境下用对应issue中提到的复现方法测试并无问题。

@House-Men 要复现这个问题需要编译时关闭WITH_NGHTTP2.

@House-Men
Copy link
Contributor

House-Men commented May 31, 2024

标准库的智能指针有运算符重载 parser==NULL 和 parser.get() == nullptr是一样的,只不过前者非推荐写法不排除某些环境原因出现问题,不过如果对方的编译运行环境因这个写法产生问题那么可不止这一处地方需要改,还有许多地方有类似这样的写法。 我用clang17在windows/vc14和linux(uos20)/gnu8.3环境下用对应issue中提到的复现方法测试并无问题。

@House-Men 要复现这个问题需要编译时关闭WITH_NGHTTP2.

我不仅是关闭了WITH_NGHTTP2的甚至都没有nginxhttp2依赖
fa2c08be0ba44a10e9361258119430b8

@ithewei ithewei merged commit a56fc78 into ithewei:master May 31, 2024
6 checks passed
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.

HttpHandler::Reset() 里面, 使用了空指针造成崩溃
3 participants