boostorg / boostorg/process

boost::process:child constructor segmentation fault when passed an empty string

Open
#209 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
145
Forks
151
PR merge metrics
No merged PRs in 30d

Description

You can demonstrate this on the Wandbox online compiler using gcc 11.1.0 and c++11:

```
# prog.cc
#include
#include

int main(){
try {
boost::process::child("");
} catch(const std::system_error& e) {
}
}
```

```
g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.76.0/gcc-11.1.0/include -std=c++11

Start
Segmentation fault
Finish
```

The documentation on https://www.boost.org/doc/libs/1_76_0/doc/html/boost_process/tutorial.html#boost_process.tutorial.error_handling leads me to believe that this case should throw a std::system_error rather than segfault.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.