nodejs / nodejs/uvwasi

Overlapping preopens

Open
#111 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
270
Forks
60
PR merge metrics
No merged PRs in 30d

Description

While working on VFS support, I run into this problem.
A temporary directory is created and I'd like to mount it to the root fs:

    uvwasi_preopen_t preopens[3];
    preopens[0].mapped_path = "/";
    preopens[0].real_path = ".";
    preopens[1].mapped_path = ".";
    preopens[1].real_path = ".";
    preopens[2].mapped_path = "/_wasmer";
    preopens[2].real_path = "/tmp/wasm3_temp/1234/_wasmer";

This conflicts with the first (root) entry, and I cannot access _wasmer.
If I reorder preopens, I can access _wasmer, but not the root content.

How should this be handled?

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 from the VFS support and the uvwasi_preopen_t handling shown in the issue, then trace how overlapping mapped paths are resolved and why ordering changes access. No files or tests are named; done requires an agreed behavior for overlapping preopens and coverage for the root and /_wasmer cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.