LiveSplit / LiveSplit/auto-splitter-template

virtual-function-elimination leads to unstable assembly code

Open
#2 0 comments 0 reactions 0 assignees View on GitHub

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

image-22

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.