Thyre wrote:

> Depending on the tool workflow, this wrong information might lead to memory 
> leaks and double-frees. To handle this nested sequence of data-op callbacks, 
> we would need a stack for the `HostOpId`. If we know, that it will never be 
> more than two levels, we could cheat and make it a static-sized thread-local 
> stack.

I fully agree that this can cause issues. For this particular case, 
https://github.com/llvm/llvm-project/pull/200202 should resolve the nested 
`transfer_to_device` event. Having a stack for the `HostOpId` is probably the 
safest option going forward though, since we might encounter such a case again 
in the future. 

https://github.com/llvm/llvm-project/pull/194168
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to