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

Adding nullptr to std::string #861

Open
psorokovnin-at-aligntech opened this issue Apr 20, 2021 · 1 comment
Open

Adding nullptr to std::string #861

psorokovnin-at-aligntech opened this issue Apr 20, 2021 · 1 comment

Comments

@psorokovnin-at-aligntech

In https://github.com/boostorg/compute/blob/develop/include/boost/compute/detail/path.hpp#L31 std::getenv can return nullptr. It happens for $HOME in my case and produces a segmentation fault. I don't know the specification for operator+(const char*, const std::string&), but I know that construction of std::string from nullptr is undefined behaviour.

@chetanpandey1266
Copy link

Can you please assign this issue with me?

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