[cfe-users] Clang9 UBSan and GMP

David Blaikie via cfe-users cfe-users at lists.llvm.org
Fri Oct 25 14:15:52 PDT 2019


It's pretty hard to conclude whether it's a bug in your code or in the
compiler, or both, without narrowing down a test case.

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

> So then there probably is an issue with the optimization.
>
> Just run 'gmp-6.1.2’ with MacPorts clang 9.0.0; I got:
> ../../../gmp-6.1.2/test-driver: line 107: 70037 Abort trap: 6
>  "$@" > $log_file 2>&1
> FAIL: t-sqrlo
>
> With Apple clang 11.0.0 (clang-1100.0.33.8), I got another ‘make check’
> error, also only when using optimization:
> ../../../gmp-6.1.2/test-driver: line 107: 30266 Segmentation fault: 11
> "$@" > $log_file 2>&1
> FAIL: t-toom53
>
>
> > On 25 Oct 2019, at 22:53, David Blaikie <dblaikie at gmail.com> wrote:
> >
> > 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.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20191025/d5d5cca3/attachment.html>


More information about the cfe-users mailing list