microsoft / microsoft/edit

Redox OS Port: Refcell already borrowed

Open
#660 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
14.6k
Forks
734
Avg merge
8h 40m
Merged PRs (30d)
4

Description

Hello! I tried to port `edit` into [Redox](https://redox-os.org/), and it's compiling well! Interestingly, I got `edit` crashed at startup.

I look deeper and stumble upon [cell.rs](https://github.com/microsoft/edit/blob/bb569841c98d604d6b5627b49927a3aff08e9bfc/src/cell.rs), I went to comment out all release scope in that and now it shown this:

```
thread 'main' (1) panicked at src/tui.rs:773:33:
Refcell already borrowed
```

Given the same code runs well on Linux I think this is a problem into rust compiler on Redox itself. But I unable to isolate the problem into a simple test.

The code crashed around [src/tui.rs:773](https://github.com/microsoft/edit/blob/bb569841c98d604d6b5627b49927a3aff08e9bfc/src/tui.rs#L773) and it crashed the first time it hit this code, and I also unable to work around it.

I would like either having a minimal reproducible code around it, or maybe some insight into this problem. I think actually trying to solve this will be hard (I don't know who borrows it?) and I understand the OS is not in your supported target at this time.

Contributor guide

Open the contributing guide

Research direction

Reproduce the startup panic on Redox and inspect src/tui.rs:773 alongside the borrow handling in src/cell.rs. First isolate whether the failure is specific to Redox or the Rust compiler there; done means a minimal reproducer or a confirmed cause with a focused fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.