[llvm-dev] InlineFunction.cpp: IFI.InlinedCallSites and intrinsics
Jeroen Dobbelaere via llvm-dev
llvm-dev at lists.llvm.org
Fri Jul 9 01:32:08 PDT 2021
Hi all,
I have been investigating a 'use after free' in the inliner. (This is with the full restrict patches)
The problem is related to an intrinsic call that is removed, but later on is used anyway because
the instruction was being tracked in the 'IFI.InlinedCallSites':
https://github.com/llvm/llvm-project/blob/1db2551cc1a356a67c0967f424d6158e2ea127e3/llvm/lib/Transforms/Utils/InlineFunction.cpp#L2448
As similar code here:
https://github.com/llvm/llvm-project/blob/1db2551cc1a356a67c0967f424d6158e2ea127e3/llvm/lib/Transforms/Utils/InlineFunction.cpp#L1350
avoids updating 'IFI.InlinedCalls' for intrinsics, I am wondering if the same logic should be added to the former.
Or is there a good reason that intrinsics must be included in 'IFI.InlinedCallSites' ?
Thanks,
Jeroen Dobbelaere
More information about the llvm-dev
mailing list