[cfe-users] Clang9 UBSan and GMP

Hans Ã…berg via cfe-users cfe-users at lists.llvm.org
Thu Nov 7 09:15:43 PST 2019


> On 7 Nov 2019, at 15:24, Hans Wennborg <hans at chromium.org> wrote:
> 
> Looking at LLVM's -print-after-all shows a diff after GVN which seems
> to come from this if-statement in tests/mpn/t-sqrlo.c:
> 
>      if (pp[-1] != p_before || pp[n] != p_after
>  || scratch[-1] != s_before || scratch[itch] != s_after
>  || mpn_cmp (refp, pp, n) != 0)
> {
> 
> It looks like the "scratch[-1] != s_before" expression was previously
> folded to false, but now it's folded to undef (and the branch ends up
> going the other way). That matches the commit message from the
> bisection.

GMP bugs may be reported to their bug list, and the UBSan might be strengthened to capture this.





More information about the cfe-users mailing list