-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
src/scheduler.rs:211
pub fn run_queued_tasks(&self, id: usize) {
let local = unsafe { self.local_queues.get_unchecked(id) };
let stealers = unsafe { self.stealers.get_unchecked(id) };
loop {
// Pop a task from the local queue
let co = local.pop().or_else(|| {
The parameter id
in Scheduler::run_queued_tasks
used in get_unchecked without sufficient check. The function itself is public and safe function. The developer might cause memory risks. In Rust, we should not cause any memory issues by merely using safe functions.
Suggestions:
- mark the function as unsafe
- add sufficient boundary check
Metadata
Metadata
Assignees
Labels
No labels