Missing return statements in file default_launcher.hpp cause an 'illegal instruction'
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- operating-systems
Research direction
Open boost/process/v2/posix/default_launcher.hpp and inspect invoke_on_success, invoke_on_error, invoke_on_fork_error, and invoke_on_exec_error. Confirm that each function's declared return type matches its callback, then ensure all four callback results are returned and verify the reported illegal-instruction crash no longer occurs.
Written by the indexing model from the issue text.
Description
In boost/process/v2/posix/default_launcher.hpp there is a template function invoke_on_success defined as
template<typename Launcher, typename Init>
inline auto invoke_on_success(Launcher & launcher, const filesystem::path &executable,
const char * const * (&cmd_line),
Init && init, derived && )
-> decltype(init.on_success(launcher, executable, cmd_line))
{
init.on_success(launcher, executable, cmd_line);
}
This function is supposed to have a return value, but a return statement is missing. This causes (on my installation, using recent versions of both g++ and clang++) an 'illegal instruction' followed by an inevitable crash.
Adding a return statement solved the problem:
template<typename Launcher, typename Init>
inline auto invoke_on_success(Launcher & launcher, const filesystem::path &executable,
const char * const * (&cmd_line),
Init && init, derived && )
-> decltype(init.on_success(launcher, executable, cmd_line))
{
return init.on_success(launcher, executable, cmd_line);
}
The same problem occurs (in the same file default_launcher.hpp) with the routines
invoke_on_error, invoke_on_fork_error and invoke_on_exec_error
- Dominant language
- C++
- Stars
- 145
- Forks
- 151
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from boostorg/process
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
All issues in boostorg/process
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·