Skip to content

add recursion check in __call__#4213

Open
joohongpark wants to merge 1 commit into
RustPython:mainfrom
joohongpark:fix-recursion
Open

add recursion check in __call__#4213
joohongpark wants to merge 1 commit into
RustPython:mainfrom
joohongpark:fix-recursion

Conversation

@joohongpark
Copy link
Copy Markdown
Contributor

No description provided.

@joohongpark joohongpark marked this pull request as ready for review October 15, 2022 06:18
Copy link
Copy Markdown
Member

@youknowone youknowone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Snowapril could you review this PR?

@youknowone youknowone added the z-ca-2022 Tag to track contrubution-academy 2022 label Oct 15, 2022
Comment thread vm/src/types/slot.rs
Comment on lines +257 to +259
vm.with_recursion("while calling a Python object", || {
vm.call_special_method(zelf.to_owned(), identifier!(vm, __call__), args)
})
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, in cpython, the recursion check what we inserted in this PR exist inside of _PyObject_Call. It is corresponded to invoke in our code. I'm a little bit afraid that invoke is currently used anywhere in our codes. It can make a little bit slow-down.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

z-ca-2022 Tag to track contrubution-academy 2022

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants