Open psorokovnin-at-aligntech opened 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.
Can you please assign this issue with me?
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.