[PATCH] D156821: [CodeGen] [ubsan] Respect integer overflow handling in abs builtin
Thurston Dang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 18 10:00:07 PDT 2023
thurston added a comment.
This patch might have broke the buildbots, starting with when it was first built in https://lab.llvm.org/buildbot/#/builders/85/builds/18390
/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/include/c++/v1/stdlib.h:114:25: runtime error: negation of -9223372036854775808 cannot be represented in type 'long'; cast to an unsigned type to negate this value to itself
#0 0x5586b6dfb9aa in abs /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/include/c++/v1/stdlib.h:114:10
#1 0x5586b6dfb9aa in (anonymous namespace)::GNUELFDumper<llvm::object::ELFType<(llvm::support::endianness)1, true>>::printRelRelaReloc((anonymous namespace)::Relocation<llvm::object::ELFType<(llvm::support::endianness)1, true>> const&, (anonymous namespace)::RelSymbol<llvm::object::ELFType<(llvm::support::endianness)1, true>> const&) /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:3778:21
(which is good insofar as it finds a real bug, but nonetheless is turning the buildbots red)
In the latest buildbots, the error persists (along with an unrelated failure): https://lab.llvm.org/buildbot/#/builders/85/builds/18413
The compiler code is a tad too nuanced for me to fix with confidence (e.g., my first instinct would be to widen the type to int128 but I don't know if that will break compatibility).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156821/new/
https://reviews.llvm.org/D156821
More information about the cfe-commits
mailing list