brk does not count the data segment toward RLIMIT_DATA

Open
#487 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
c, macos

Research direction

Start by reading the ELF loader and the execve and fork state paths; the issue does not name specific files or tests. Compare elfuse's break accounting with Linux's check_data_rlimit formula, then trace how start_data and end_data would need to survive execve and fork. Done means break growth is limited by both the data segment and the configured soft RLIMIT_DATA.

Written by the indexing model from the issue text.

Description

bug

Linux's check_data_rlimit holds (brk - start_brk) + (end_data - start_data) to the soft RLIMIT_DATA. elfuse (after #485) holds only brk - brk_base, because it does not record start_data/end_data. A break can then grow past the limit by up to the size of the data segment. A fix would record both values in the ELF loader and carry them through execve and the fork state.

Dominant language
C
Stars
287
Forks
33
Avg merge
2d 17h
Merged PRs (30d)
18

Getting set up

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.

More from sysprog21/elfuse

All issues in sysprog21/elfuse

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.