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

Interactive graders can cause judge to hang due to large integers. #606

Closed
ehhthing opened this issue Jan 7, 2020 · 0 comments
Closed
Assignees
Milestone

Comments

@ehhthing
Copy link
Member

ehhthing commented Jan 7, 2020

The readint() function in the interactive grader does not limit the number of digits in the integer.

When parsing an integer with int(), a very large (>10^7 digits) integer can cause the judge to hang. See this submission. This only affects interactive problems with longer time limits because 2 seconds is not currently enough to output all the digits of such an integer in an unbuffered problem.

Just to note that this also affects all custom checkers that use int() without limiting the number of digits, including those with time limits as low as 1 second.

A reasonable limit could be 10^5 digits, which is more then reasonable for all problems and does not cause the judge to hang.

Another possible solution is to move to sandboxed interactors with the bridged grader.

@Xyene Xyene self-assigned this Apr 4, 2020
@Xyene Xyene added this to the 2.1.0 milestone Apr 4, 2020
Xyene added a commit to Xyene/judge that referenced this issue Apr 4, 2020
@Xyene Xyene closed this as completed in 0467e58 Apr 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants