llvm / llvm/llvm-project

[analyzer] detect `errno` misuse

Open
#182,516 3 comments 0 reactions 0 assignees View on GitHub
clang:static analyzer enhancement
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

It would be helpful to have an analysis which detects the incorrect usage of `errno`:
- checking after calls which do not set it
- not checking after calls which set it
- checking after a call which sets it but with another call which sets it in-between
- checking for values which are not being used by the call

Contributor guide

Open the contributing guide

Research direction

The issue does not name files, tests, or an analyzer entry point. Start by locating the analyzer component responsible for errno-related checks, then define coverage for each listed misuse and add tests showing the analysis detects them without false positives.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.