Ruihan Li

Results 26 issues of Ruihan Li

The `ENOENT` error code in `unregister_observer` is not useful, as detailed in https://github.com/asterinas/asterinas/pull/771#issuecomment-2070859595. So this PR proposes to remove this pointless error code.

The CI `osdk-doc-env-test` can finish within 5 minutes in most runs: https://github.com/asterinas/asterinas/actions/runs/8781560534/job/24093827863 However, it cannot finish after 15 minutes in some CI runs: https://github.com/asterinas/asterinas/actions/runs/8781176026/job/24092629664 https://github.com/asterinas/asterinas/actions/runs/8585860702/job/23527706471 Notably, it always hangs after...

PoC, based on the framework for writing regression tests presented in https://github.com/asterinas/asterinas/pull/699: ```c #include #include #include #include #include "../include/test.h" #define PAGE_SIZE 4096 static void *page; static const char filename[65536] =...

Fixes #646. I guess the reported test failure is caused by the non-blocking receiver being able to finish before the sender sends all of its data in some race conditions....

```rust impl Vmar_ { /// get mapped vmo at given offset fn get_vm_mapping(&self, offset: Vaddr) -> Result { let inner = self.inner.lock(); let range = offset..offset + 1; if let...

```rust #[derive(Debug, Clone)] pub struct VmSpace { memory_set: Arc, } impl VmSpace { /// determine whether a vaddr is already mapped pub fn is_mapped(&self, vaddr: Vaddr) -> bool { let...

I want to argue that the following code snippet should not trigger `significant_drop_in_scrutinee` (https://github.com/rust-lang/rust-clippy/issues/8987). The iterator holds a reference to the locked data, so it is expected that the mutex...

S-waiting-on-review

https://github.com/asterinas/asterinas/blob/81cca422058bff9771927293f9741548a8d62c67/framework/aster-frame/src/sync/wait.rs#L157-L159 Quoted from https://github.com/asterinas/asterinas/pull/828#discussion_r1597356052: > No, I don't think this is correct. If it is correct, why should I write `self.count.fetch_add(0, Ordering::Release) == 0`, which looks pretty wired at first...

This code snippet causes all `Task` structures to leak, because the `Arc` on the stack is simply forgotten, since the `Task::exit` function never returns. https://github.com/asterinas/asterinas/blob/0594a73ac927c20ccef8c9c2520b36b8c174eb53/framework/aster-frame/src/task/task.rs#L260-L265 Once the above problem is...

This lint should also work for `if let` and `while let`, so this PR makes it actually work. For `while let`, I can't think of any reason why this lint...

S-waiting-on-review