tlopex commented on issue #18923:
URL: https://github.com/apache/tvm/issues/18923#issuecomment-4168426714

   Thanks for the investigation! @thishome 
   The fix looks correct — FreeHandle is intended for FFI object handles, while 
space_.data here is a data-space pointer allocated by AllocDataSpace, so it 
should be released with FreeDataSpace instead. The segfault also makes sense 
given that mismatch.
   Could you open a PR for this? 
   
   There are two additional things to address:
   Exception safety: please wrap the FreeDataSpace call in a try/catch (const 
Error&) block, so cleanup stays fault-tolerant when the remote connection has 
already been closed. This would also be consistent with other RPC cleanup paths 
(for example rpc_device_api.cc:73-77).
   Test coverage: please add a basic test that covers tensor creation and 
release over RPC, to help prevent regressions.
   
   Looking forward to the PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to