WebAssembly / WebAssembly/wasi-libc

locking issues in chdir.c

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

Nobody has claimed this yet.

threads
Dominant language
C
Stars
1k
Forks
251
Avg merge
7h 15m
Merged PRs (30d)
3

Description

in make_absolute:

  • __wasilibc_cwd_unlock is called twice
  • static vars (make_absolute_buf/make_absolute_len) are used w/o lock

in chdir:

  • static vars (relative_buf/relative_buf_len/__wasilibc_cwd_mallocd) are used w/o lock

Contributor guide

No contributing guide indexed for this repository

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 chdir.c at make_absolute and chdir, then trace the __wasilibc_cwd_unlock calls and the listed static variables. Confirm the locking requirements for each shared variable and remove the duplicate unlock. Done means the listed accesses are protected without introducing an unmatched lock operation.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
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.