Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent stack overflow when an encoder is registered from Python #1429

Merged

Conversation

lostmsu
Copy link
Member

@lostmsu lostmsu commented Mar 30, 2021

What does this implement/fix? Explain your changes.

This disables ability to register encoders for System.Type.

Without this restriction encoders created in Python cause stack overflow due to repeated attempts to pass System.Type instance to CanDecode, which requires encoding the instance of System.Type.

Does this close any currently open issues?

#1427

Checklist

Check all those that are applicable and complete.

  • Make sure to include one or more tests for your change
  • Updated the CHANGELOG

@lostmsu lostmsu force-pushed the bugs/StackOverflow_with_raw_list_encoder branch 3 times, most recently from 3208bd2 to aa5e504 Compare Mar 30, 2021
@lostmsu lostmsu marked this pull request as ready for review Mar 30, 2021
lostmsu added 2 commits Mar 31, 2021
(stack overflow trying to pass `System.Type` to `CanEncode`)
Without this restriction encoders created in Python cause stack overflow due to repeated attempts to pass `System.Type` instance to `CanDecode`, which requires encoding the instance of `System.Type`, et. cetera

fixes pythonnet#1427
@lostmsu lostmsu force-pushed the bugs/StackOverflow_with_raw_list_encoder branch from 6b87b38 to 8045b5f Compare Mar 31, 2021
@lostmsu lostmsu force-pushed the bugs/StackOverflow_with_raw_list_encoder branch from 8045b5f to 0d33a90 Compare Mar 31, 2021
@lostmsu lostmsu merged commit 23527d1 into pythonnet:master Mar 31, 2021
25 of 26 checks passed
@lostmsu lostmsu deleted the bugs/StackOverflow_with_raw_list_encoder branch Mar 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant