LiveSplit / LiveSplit/auto-splitter-template
virtual-function-elimination leads to unstable assembly code
Nobody has claimed this yet.
- Dominant language
- Liquid
- Stars
- 9
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
As described in the book, VFE tends to remove vtable functions too eagerly, leading to miscompilations, with situations that will trigger panics despite using completely safe code.
An example is provided by the following code, which is completely safe and correct from a language standpoint on std, but will trigger a panic upon calling the .to_string() function
In these cases you might want to remove the flag declared in here altogether.
Contributor guide
No contributing guide indexed for this repository
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
Open .cargo/config.toml.liquid and inspect the compiler flag at the linked line. Confirm that it enables virtual-function elimination, then remove that flag and verify that the safe .to_string() example no longer triggers the reported panic. No test file is mentioned, so validation should focus on the provided failure scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100