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

Possible improvements #3

Closed
JelleZijlstra opened this issue May 18, 2023 · 1 comment · Fixed by #5
Closed

Possible improvements #3

JelleZijlstra opened this issue May 18, 2023 · 1 comment · Fixed by #5
Assignees

Comments

@JelleZijlstra
Copy link
Collaborator

A couple of things we should consider changing:

  • Use __a and __b as the names, so we can catch name mangling bugs
  • Constrain what kind of expressions appear in subscripts, so we generate less code like (1)[a] that will fail at runtime. I feel such code is less likely to be interesting, as the TypeError from the subscript could hide more interesting errors.
  • In the function evaluation code from evaluate namespaces recursively, and function namespaces, too #2, first check how many arguments the function takes using inspect, and pass those arguments. That way, we get a bit more coverage of locals.
@JelleZijlstra
Copy link
Collaborator Author

Another one: the repro case from python/cpython#104619 actually crashed the evalserver with a RecursionError, because the function returned itself and we kept recursively calling it. We should put some limit on the recursive namespace evaluation.

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 a pull request may close this issue.

1 participant