[all-commits] [llvm/llvm-project] 2e81f7: [analyzer] Fix crash in Stream checker when using ...

Balazs Benics via All-commits all-commits at lists.llvm.org
Mon Jul 1 08:34:05 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2e81f7db1f1c161a1683bcad55e0c04677a17a9d
      https://github.com/llvm/llvm-project/commit/2e81f7db1f1c161a1683bcad55e0c04677a17a9d
  Author: Balazs Benics <benicsbalazs at gmail.com>
  Date:   2024-07-01 (Mon, 01 Jul 2024)

  Changed paths:
    M clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp
    M clang/test/Analysis/stream.c

  Log Message:
  -----------
  [analyzer] Fix crash in Stream checker when using void pointers (#97199)

We can get zero type size (thus div by zero crash) if the region is for a 'void*' pointer.
In this patch, let's just override the void type with a char type to avoid the crash.

Fixes
https://github.com/llvm/llvm-project/pull/93408#issuecomment-2189766510



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list