yeputons's blog

By yeputons, 10 years ago, translation, In English

Everyone knows a problem with native executables on Windows: if it tries to allocate very large static arrays (or something similar that causes problems during the loading), then the testing system may mark the submission as 'it killed our system' and report nothing to the participant. Say, in Testsys it caused Failed To Test (and no feedback to the participant), on Codeforces it caused Denial of Judgement, and PCMS2 still has this problem. Example submission:

int data[(int)2.1e9 / sizeof(int)];
main() {}

If one is familiar with process creation on Windows, it's obvious what to do: try to run the solution right after compilation and report Compilation Error with report in case of invalid executable. It looks like noone except me have the time to do this and here is my utility, which already serves on Codeforces. If you have your own testing system, you're welcome to run this application after compilation to check an executable for validness (you can just copy-paste the code directly into your judging module, too). After that you will be able to report incidents to the user and drop hints about extra large arrays existance.

No user code is being running during the check: process is fully suspended by the OS after successfull loading and before any instructions are run (it's what the CREATE_SUSPENDED parameter is responsible for).

  • Vote: I like it
  • +107
  • Vote: I do not like it