Skip to content

Conversation

@prandla
Copy link
Member

@prandla prandla commented Feb 12, 2026

  • check for the sandbox "memory limit exceeded" result in compilation_step.
  • change the sandbox so that memory limit is diagnosed more often: specifically, gcc has a driver process which catches the child's death and prints a nice error message. with the previous code this would result in a regular "nonzero return" verdict; now it's memory-limit (though the nice message on stderr is still visible).
  • add a new user-visible compilation outcome for it.
  • added a test for it. this test tries to use 1.1GB of memory for me, and fails in CMS in around 0.3 seconds, so it should quite reliably trigger the memory limit.
    • currently AWS actually doesn't distinguish the different kinds of compilation failure, so these tests all just assert that some compilation failure happened. this could be made more specific in the future.

@codecov
Copy link

codecov bot commented Feb 12, 2026

Codecov Report

❌ Patch coverage is 42.85714% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.66%. Comparing base (f2af1fb) to head (733f457).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
cms/grading/steps/compilation.py 25.00% 3 Missing ⚠️
cms/grading/Sandbox.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1633      +/-   ##
==========================================
- Coverage   54.66%   54.66%   -0.01%     
==========================================
  Files         335      335              
  Lines       27361    27365       +4     
==========================================
+ Hits        14958    14959       +1     
- Misses      12403    12406       +3     
Flag Coverage Δ
functionaltests 0.00% <0.00%> (ø)
unittests 54.66% <42.85%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@veluca93 veluca93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I would want to double check with @gollux :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants