rust-lang / rust-lang/libc

`RLIM_*` constants mismatch with system header files

Open
#2,724 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-bug E-easy
Dominant language
Rust
Stars
2.6k
Forks
1.3k
Avg merge
1d 22h
Merged PRs (30d)
69

Description

The three constants defined in libc are different from those defined in <sys/resources.h> on some platforms.

libc::RLIM_INFINITY
libc::RLIM_SAVED_CUR
libc::RLIM_SAVED_MAX

Targets

arm-unknown-linux-gnueabi
arm-unknown-linux-gnueabihf
armv5te-unknown-linux-gnueabi
armv7-unknown-linux-gnueabihf
i586-unknown-linux-gnu
i686-unknown-linux-gnu
mips-unknown-linux-gnu
mipsel-unknown-linux-gnu
powerpc-unknown-linux-gnu

Test code: https://github.com/Nugine/libc-rlim-mismatch/blob/master/src/lib.rs
Test result: https://github.com/Nugine/libc-rlim-mismatch/actions/runs/1984774750

This bug is initially discovered in Nugine/rlimit tests.

Test result: https://github.com/Nugine/rlimit/actions/runs/1984623879
Workflow file: https://github.com/Nugine/rlimit/actions/runs/1984623879/workflow
Issue: https://github.com/Nugine/rlimit/issues/30

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked libc-rlim-mismatch test code and its CI results, then inspect the Rust libc definitions for RLIM_INFINITY, RLIM_SAVED_CUR, and RLIM_SAVED_MAX on the listed targets. Compare them with each target's <sys/resources.h>; done means the constants match and the reproducer and relevant checks pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, rust
Domain
operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.