boostorg / compute

A C++ GPU Computing Library for OpenCL
http://boostorg.github.io/compute/
Boost Software License 1.0
1.56k stars 332 forks source link

Adding nullptr to std::string #861

Open psorokovnin-at-aligntech opened 3 years ago

psorokovnin-at-aligntech commented 3 years ago

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 commented 2 years ago

Can you please assign this issue with me?