<div dir="ltr">I don't see any reason to add intrinsics into `IFI.InlinedCallSites`. Seems like all users expect it to only contain actual function calls.<div><br></div><div>Is the use after free specific to your patches, or is it observable currently in ToT LLVM?</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 9, 2021 at 2:32 AM Jeroen Dobbelaere via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
<br>
I have been investigating a 'use after free' in the inliner. (This is with the full restrict patches)<br>
<br>
The problem is related to an intrinsic call that is removed, but later on is used anyway because<br>
the instruction was being tracked in the 'IFI.InlinedCallSites':<br>
<br>
<a href="https://github.com/llvm/llvm-project/blob/1db2551cc1a356a67c0967f424d6158e2ea127e3/llvm/lib/Transforms/Utils/InlineFunction.cpp#L2448" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/blob/1db2551cc1a356a67c0967f424d6158e2ea127e3/llvm/lib/Transforms/Utils/InlineFunction.cpp#L2448</a><br>
<br>
As similar code here:<br>
<a href="https://github.com/llvm/llvm-project/blob/1db2551cc1a356a67c0967f424d6158e2ea127e3/llvm/lib/Transforms/Utils/InlineFunction.cpp#L1350" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/blob/1db2551cc1a356a67c0967f424d6158e2ea127e3/llvm/lib/Transforms/Utils/InlineFunction.cpp#L1350</a><br>
<br>
avoids updating 'IFI.InlinedCalls' for intrinsics, I am wondering if the same logic should be added to the former.<br>
Or is there a good reason that intrinsics must be included in 'IFI.InlinedCallSites' ?<br>
<br>
Thanks,<br>
<br>
Jeroen Dobbelaere<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>