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

Use correct printf format specifier for filesize. #2158

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

meisterT
Copy link
Member

The default value for filesize for scripts is 2.5GB, so more than 2^31 bytes, previously this caused a message like

/home/sitowert/domjudge/bin/runguard [56839 @   0.001495]: verbose: setting filesize limit to -1610612736 bytes

After this commit, it is:

/home/sitowert/domjudge/bin/runguard [56839 @   0.001521]: verbose: setting filesize limit to 2684354560 bytes

The default value for filesize for scripts is 2.5GB, so more than 2^31
bytes, previously this caused a message like

```
/home/sitowert/domjudge/bin/runguard [56839 @   0.001495]: verbose: setting filesize limit to -1610612736 bytes
```

After this commit, it is:
```
/home/sitowert/domjudge/bin/runguard [56839 @   0.001521]: verbose: setting filesize limit to 2684354560 bytes
```
@meisterT meisterT requested a review from eldering September 24, 2023 15:07
@eldering
Copy link
Member

Agreed, according to man setrlimit the rlim_t data type is an unsigned long, also double checked in the kernel source.

@meisterT meisterT merged commit a12c260 into DOMjudge:main Sep 25, 2023
18 checks passed
eldering pushed a commit to vmcj/domjudge that referenced this pull request Feb 27, 2024
The default value for filesize for scripts is 2.5GB, so more than 2^31
bytes, previously this caused a message like

```
/home/sitowert/domjudge/bin/runguard [56839 @   0.001495]: verbose: setting filesize limit to -1610612736 bytes
```

After this commit, it is:
```
/home/sitowert/domjudge/bin/runguard [56839 @   0.001521]: verbose: setting filesize limit to 2684354560 bytes
```

(cherry picked from commit a12c260)
vmcj pushed a commit that referenced this pull request Feb 28, 2024
The default value for filesize for scripts is 2.5GB, so more than 2^31
bytes, previously this caused a message like

```
/home/sitowert/domjudge/bin/runguard [56839 @   0.001495]: verbose: setting filesize limit to -1610612736 bytes
```

After this commit, it is:
```
/home/sitowert/domjudge/bin/runguard [56839 @   0.001521]: verbose: setting filesize limit to 2684354560 bytes
```

(cherry picked from commit a12c260)
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.

3 participants