[cfe-users] Clang9 UBSan and GMP

Hans Åberg via cfe-users cfe-users at lists.llvm.org
Fri Oct 25 14:01:49 PDT 2019


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.




More information about the cfe-users mailing list