Skip to content

More junk cases for output validator fuzzing - #491

Open
Matistjati wants to merge 1 commit into
Kattis:masterfrom
Matistjati:more-output-validator-fuzzing
Open

More junk cases for output validator fuzzing#491
Matistjati wants to merge 1 commit into
Kattis:masterfrom
Matistjati:more-output-validator-fuzzing

Conversation

@Matistjati

Copy link
Copy Markdown
Contributor

Rationale for each:

  • 1e1000000000: we try to target output validators that naively use Fraction(input()), which will time out. The other one with 1\n... targets the same class, but guesses that the output format is first n, number of items.
  • 10^5000 targets Python output validators, where parsing this to an int is RTE (4300 is the arbitrarily set max).
  • 10^400 targets validators that correctly handle the 10^5000 RTE, but then do float math with it. E.g. float(int("1"+"0"*400)) and 1.0 - int("1"+"0"*400) both RTE
  • 1e309 and 1e-400 targets std::stod, which throws an exception for both

Cases 1-3 crashes real output validators installed on Kattis. The fourth is hypothetical, but they seem generally useful to have.
These are clearly malicious inputs and somewhat implausible to be observed from "normal" contestants.

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