https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105897

            Bug ID: 105897
           Summary: RFE: -fanalyzer could complain about misuses of
                    pthread API
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: analyzer
          Assignee: dmalcolm at gcc dot gnu.org
          Reporter: dmalcolm at gcc dot gnu.org
            Blocks: 105887
  Target Milestone: ---

See:
  https://clang.llvm.org/docs/analyzer/checkers.html#alpha-unix-pthreadlock-c

Perhaps implementable as a new state machine, (keep a global list of
locks that are acquired?).

Could even have some kind of test that tries to detect inconsistent
ordering of aquisition of locks (and thus detect deadlocks).  Would
have to extend diagnostic_path-handling to cope with multiple threads...


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105887
[Bug 105887] RFE: clang analyzer warnings that GCC's -fanalyzer could implement

Reply via email to