WebAssembly / WebAssembly/wasi-libc
locking issues in chdir.c
Open
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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