diff options
| author | babenko <[email protected]> | 2026-04-20 17:50:17 +0300 |
|---|---|---|
| committer | babenko <[email protected]> | 2026-04-20 22:50:12 +0300 |
| commit | 7027f12467a5753b511a36710cc5f675560a94e4 (patch) | |
| tree | 23f2be1798397f8c973460b2254eed4867325f54 /contrib/tools/python3/Python/opcode_targets.h | |
| parent | 91c37c768c512f70419570433421865c9696ccce (diff) | |
Fix GetThreadCount always returning 0 on missing Threads field
std::optional<int> threads = 0 initializes the optional with value 0,
so threads.has_value() is always true. When the "Threads:" field is
absent from /proc/self/status the function silently returned 0 instead
of throwing NoSuchInfoInProcFS.
Fix: initialize as std::optional<int> threads (nullopt) so the
has_value() guard works as intended.
commit_hash:d1ba29e41bc8ecc37567709081958febc263f56e
Diffstat (limited to 'contrib/tools/python3/Python/opcode_targets.h')
0 files changed, 0 insertions, 0 deletions
