areusch opened a new pull request #7481:
URL: https://github.com/apache/tvm/pull/7481
* If a Node subclass raises an exception and ctypes is in use before
__init_handle_by_constructor__ is called (or self.handle is
otherwise set), a Python stack overflow could result. This is
because the unset handle slot causes self.handle accesses to
fallback on the getattr(self, 'handle') method, invoking
NodeGetAttr.
* Then I believe this causes an infinite loop.
* The fix is to make Node.__getattr__ raise AttributeError for all
attributes in __slots__, then make __del__ tolerant to missing
self.handle.
* I don't believe cython is affected because it implements a
descriptor to access its underlying chandle and that shouldn't be unset.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]