Skip to content

Set cwd when running input validators#405

Merged
gkreitz merged 1 commit intoKattis:masterfrom
Matistjati:336-core-dump
Apr 13, 2026
Merged

Set cwd when running input validators#405
gkreitz merged 1 commit intoKattis:masterfrom
Matistjati:336-core-dump

Conversation

@Matistjati
Copy link
Copy Markdown
Contributor

Closes #336. I think that this is the right solution- changing the limit ourselves adds more noise to the codebase as opposed to just masking it by dumping the core in the temporary working directory.

Doesn't result in a statistically significant slowdown.

matistjati@DESKTOP-BJV27M6:~/po/swedish-olympiad-2026/lager2$ ulimit -c unlimited
matistjati@DESKTOP-BJV27M6:~/po/swedish-olympiad-2026/lager2$ time ~/kattis/problemtools/bin/verifyproblem.sh fredrikspizzeria -p data
Loading problem fredrikspizzeria
Checking data
fredrikspizzeria tested: 0 errors, 0 warnings

real    0m25.040s
user    0m20.809s
sys     0m2.376s
matistjati@DESKTOP-BJV27M6:~/po/swedish-olympiad-2026/lager2$ ulimit -c 0
matistjati@DESKTOP-BJV27M6:~/po/swedish-olympiad-2026/lager2$ time ~/kattis/problemtools/bin/verifyproblem.sh fredrikspizzeria -p data
Loading problem fredrikspizzeria
Checking data
fredrikspizzeria tested: 0 errors, 0 warnings

real    0m24.472s
user    0m20.102s
sys     0m2.428s

Copy link
Copy Markdown
Contributor

@gkreitz gkreitz left a comment

Choose a reason for hiding this comment

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

Ideally, we should probably try to follow https://www.kattis.com/problem-package-format/spec/2025-09.html#working-directory here (even if we need to fudge things a bit - as there isn't really a submission here...)

But it's clear progress not to litter the package with core files, thanks! :)

@gkreitz gkreitz merged commit 320def9 into Kattis:master Apr 13, 2026
4 of 5 checks passed
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.

Verifying examples/oddecho drops a core in the working directory

2 participants