summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface
diff options
context:
space:
mode:
authorBalazs Benics <benicsbalazs@gmail.com>2024-07-23 13:22:58 +0200
committerGitHub <noreply@github.com>2024-07-23 13:22:58 +0200
commitb60fec27fd1bbab8c2c7a77b4be7836a1beb326f (patch)
treec7ea246b81424aabfeddcc622dbbdd66d5084ef1 /lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface
parentd5a614d44d4ef1f7354b89d3c163dde4497a2053 (diff)
[analyzer] Assume the result of 'fopen' can't alias with 'std{in,out,err}' (#100085)
'fopen' should return a new FILE handle, thus we should assume it can't alias with commonly used FILE handles, such as with 'stdin', 'stdout' or 'stderr'. This problem appears in code that handles either some input/output file with stdin or stdout, as the business logic is basically the same no matter the stream being used. However, one would should only close the stream if it was opened via 'fopen'. Consequently, such code usually has a condition like `if (f && f != stdout)` to guard the `fclose()` call. This patch brings this assumption, thus eliminates FPs for not taking the guarded branch. CPP-5306
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface')
0 files changed, 0 insertions, 0 deletions