[cfe-users] Clang9 UBSan and GMP

David Blaikie via cfe-users cfe-users at lists.llvm.org
Fri Oct 25 13:53:24 PDT 2019

UBSan adds code to check things, it necessarily changes optimizations by
having those checks in. It shouldn't affect the behavior of programs that
don't exhibit UB (but I imagine it could affect the behavior of programs
relying on specific IB  (Implementation Defined Behavior)).

Reducing a test case to better understand your code & be able to portably
demonstrate the issue would help to get traction on understanding the
behavior, seeing if it's a clang bug, etc.

On Fri, Oct 25, 2019 at 1:49 PM Hans Åberg <haberg-1 at telia.com> wrote:

> It is just an abort trap. The ‘make check' also passes if turning off
> optimization. I would have expected UBSan to not change anything in
> optimization, but merely report the issues it finds. Apparently it finds
> nothing, so it may suggest a compiler bug.
> > On 25 Oct 2019, at 22:34, David Blaikie <dblaikie at gmail.com> wrote:
> >
> > Hard to know what might be happening - what sort of failure you're
> seeing, etc. Perhaps UBSan is stabilizing/changing unspecified rather than
> undefined behavior - or the test is failing due to some undefined behavior
> that UBSan doesn't catch, etc.
> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20191025/10a1bdf3/attachment.html>

More information about the cfe-users mailing list