Skip to content

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

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

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 March 30, 2021 21:45
@lostmsu lostmsu marked this pull request as ready for review March 30, 2021 22:03
lostmsu added 2 commits March 30, 2021 20:46
(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 March 31, 2021 03:48
@lostmsu lostmsu force-pushed the bugs/StackOverflow_with_raw_list_encoder branch from 8045b5f to 0d33a90 Compare March 31, 2021 04:00
@lostmsu lostmsu merged commit 23527d1 into pythonnet:master Mar 31, 2021
@lostmsu lostmsu deleted the bugs/StackOverflow_with_raw_list_encoder branch March 31, 2021 04:10
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.

1 participant