[PATCH] D92634: [Analyzer] Diagnose signed integer overflow

Daniel Marjamäki via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 6 23:59:18 PST 2021


danielmarjamaki added a comment.

I have run clang static analysis on random open source projects. The very first finding that I look at seems (to me) to be a false positive. :-(

My code seems to think that a variable `print_count` has the value INT_MAX for some reason and to me that seems impossible. I'll investigate this..

analyzed package:
ftp://ftp.de.debian.org/debian/pool/main/libm/libmsiecf/libmsiecf_20181227.orig.tar.gz

>
=

libcerror_error.c:426:45: warning: The result of the '+' expression is undefined [core.UndefinedBinaryOperatorResult]

  			error_string_size = (size_t) print_count + 1;


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92634/new/

https://reviews.llvm.org/D92634



More information about the cfe-commits mailing list