<p dir="ltr">On 24 May 2015 4:57 pm, "Nuno Lopes" <<a href="mailto:nunoplopes@sapo.pt">nunoplopes@sapo.pt</a>> wrote:<br>
><br>
> In <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D9673-23170543&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=V6QrV0CmD0obelXGbhr3VzKJ-UERCwRlnCrPEZvQls4&s=gGpFjfTf-v0bQygXCZhyMliE2TgIgfvtl16Ux9L62Do&e=">http://reviews.llvm.org/D9673#170543</a>, @samsonov wrote:<br>
><br>
> > In <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D9673-23170474&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=V6QrV0CmD0obelXGbhr3VzKJ-UERCwRlnCrPEZvQls4&s=hs0k_T-gjhp5chpNCyicvihPKICDfWsrSF7BiWzzNNg&e=">http://reviews.llvm.org/D9673#170474</a>, @nlopes wrote:<br>
> ><br>
> > > > Wait a second, won't UBSan handle this automatically if memcpy/memmove are<br>
> > ><br>
> > > >  declared with __attribute__((nonnull)) in the header? Otherwise, is there<br>
> > ><br>
> > > >  a change to the standard that imposes these additional constraints on<br>
> > ><br>
> > > >  memcpy/memmove?<br>
> > ><br>
> > ><br>
> > > Not really. memcpy/memmove calls are handled by CGBultin and not CGCall.<br>
> > >  It's a different code path.<br>
> > > Nuno<br>
> ><br>
> ><br>
> > Interesting. I think that if we decide to implement such a check, we shouldn't depend on<br>
> >  attributes specified in the headers, so `nonnull-attribute` is no longer relevant. There are another<br>
> >  kind of compiler builtins which worth extra checks, and which don't even require headers - e.g. behavior of __builtin_ctz(0)<br>
> >  is undefined. I think we should implement another check kind `-fsanitize=builtin` that would verify arguments of<br>
> >  various builtin functions.<br>
><br>
><br>
> Well, I think in the end they are all in the UB category, so I think they fall in the scope of -fsanitize=undefined.</p>
<p dir="ltr">We have sanitizer groups (much like warning groups); nothing goes directly in -fsanitize=undefined.</p>
<p dir="ltr">> Nuno<br>
><br>
><br>
> REPOSITORY<br>
>   rL LLVM<br>
><br>
> <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D9673&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=V6QrV0CmD0obelXGbhr3VzKJ-UERCwRlnCrPEZvQls4&s=bpBTcanitgGK3WRxFpGaoDw_K5D3ROpqh3BNcOtBnEs&e=">http://reviews.llvm.org/D9673</a><br>
><br>
> EMAIL PREFERENCES<br>
>   <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_settings_panel_emailpreferences_&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=V6QrV0CmD0obelXGbhr3VzKJ-UERCwRlnCrPEZvQls4&s=cEWU_IMlP1nlfRq9QvCjL8Uk_kfC12kwuzxFrDddK-Q&e=">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
><br>
><br>
</p>