Dead loop on aarch64 platform
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- operating-systems
Research direction
Start with the EOF comparisons in src/ext/env.cpp, then review the related comparisons in src/ext/cmd.cpp and reproduce the aarch64 build warnings. Trace the environment argument loops to determine why env.cpp can fail to terminate. Done means the aarch64 build no longer reports these tautological comparisons and the environment handling no longer dead-loops.
Written by the indexing model from the issue text.
Description
There are some tautological-constant-out-of-range-compare warnings on aarch64 platform, because char is an unsigned type on it. src/ext/cmd.cpp is fine because result is still correct in this situation, but src/ext/env.cpp doesn't work well.
external/boost/libs/process/src/ext/cmd.cpp:222:28: error: result of comparison of constant -1 with expression of type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' (aka 'char') is always true [-Werror,-Wtautological-constant-out-of-range-compare]
while (procargs.back() != EOF)
~~~~~~~~~~~~~~~ ^ ~~~
external/boost/libs/process/src/ext/cmd.cpp:240:25: error: result of comparison of constant -1 with expression of type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' (aka 'char') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
if (procargs.back() == EOF)
~~~~~~~~~~~~~~~ ^ ~~~
external/boost/libs/process/src/ext/env.cpp:130:16: error: result of comparison of constant -1 with expression of type 'char' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
while (*nh != EOF)
~~~ ^ ~~~
external/boost/libs/process/src/ext/env.cpp:321:50: error: result of comparison of constant -1 with expression of type 'char' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
while (!procargs || procargs.get()[size - 1] != EOF)
~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~
- 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 ·