Why does teeos panic during exit?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
I was reading the platform sources for the runtime and I found this peculiar sys::cleanup implementation on teeos (aarch64-unknown-teeos):
This function is always invoked after main. The unsupported.rs implementation is to just do nothing, but this is panicking instead. Even if it is somehow intentional, an rtabort call would surely be much more appropriate in this context, given that unimplemented involves a call to the global allocator and panic hook.
It just looks wrong. Am I missing something?
@rustbot label T-libs O-teeos
Contributor guide
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 with library/std/src/sys/pal/teeos/mod.rs around the linked sys::cleanup implementation and compare it with the unsupported.rs behavior mentioned in the issue. Trace how cleanup is invoked after main and determine the intended failure behavior; done means the teeos implementation matches that intent without the reported panic-path concerns.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100