[PATCH] D33305: [ubsan] Add a check for pointer overflow UB

Stephan Bergmann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 7 06:50:42 PDT 2017


sberg added a comment.

Just a heads up that I ran into an arguably somewhat unexpected instance of this with (a copy of the Graphite project included in) LibreOffice, see the commit message of https://cgit.freedesktop.org/libreoffice/core/commit/?id=681b4a49d797996229513d3e842d2a431030730a "external/graphite: Avoid -fsanitize=pointer-overflow" for details.  (In short,  "ptrdiff_t d = ...; T * p += d / sizeof(T);" can trigger an overflow warning when d is negative.)


Repository:
  rL LLVM

https://reviews.llvm.org/D33305





More information about the cfe-commits mailing list