rr-debugger / rr-debugger/rr

librrpreload is (probably) leaking main-thread buffers

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

Nobody has claimed this yet.

Dominant language
C++
Stars
10.7k
Forks
662
Avg merge
2d 3h
Merged PRs (30d)
2

Description

While working on #532, I've seen that a TLS data destructor doesn't seem to be called for the main thread when it exits with return 0. It is called when exited through pthread_exit(NULL). If this is indeed the case, we can probably hack around this by registering an atexit handler to clean up the main thread.

Not particularly high priority.

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 in librrpreload's TLS data destructor path and compare process exit via return 0 with pthread_exit(NULL). Check whether an atexit handler can clean up the main-thread buffers, and verify that the buffers are released on both exit paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux
Domain
devtools, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.