bytecodealliance / bytecodealliance/wasmtime

Cranelift: build_value_labels_ranges makes several incorrect assumptions

Open
#1,362 4 comments 2 reactions 0 assignees View on GitHub
bug cranelift cranelift:area:debug wasmtime:debugging
Dominant language
Rust
Stars
18.6k
Forks
1.8k
Avg merge
1d 18h
Merged PRs (30d)
126

Description

* It assumes only one new `ValueLabel` introduced at each `SourceLoc`. (`build_value_labels_index`)
* It assumes `SourceLoc` is strictly ascending. (Checking for `last_srcloc.unwrap() > srcloc` instead of `last_srcloc.unwrap() != srcloc`)
* It assumes that a `ValueLabel` is only alive for a continuous range of `SourceLoc`. (`values_labels.range(range)`)

All of those assumptions are broken by cg_clif, meaning that `build_value_labels_ranges` often misses values in the output.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.