Skip to content

A bug in multipass JIT #161

@erxiaozhou

Description

@erxiaozhou

Bug Report

1. Minimal reproduce step (Required)

  1. Compile the WAT code to WASM and use the multipass JIT + debug mode to execute the function "to_test"
(module
  (type (;0;) (func (result f64)))
  (type (;1;) (func (result i64)))
  (func (;0;) (type 0) (result f64)
    (local f64)
    i32.const 1
    if  ;; label = @1
    end
    call 1
    local.get 0
    local.set 0
    drop
    f64.const 0x0p+0 (;=0;)
    local.tee 0
    local.get 0
    i32.trunc_f64_u
    drop)
  (func (;1;) (type 1) (result i64)
    i64.const 1)
  (export "to_test" (func 0)))

2. What did you expect to see? (Required)

0:f64

3. What did you see instead (Required)

There is a crash.

dtvm: /usr/lib/llvm-15/include/llvm/ADT/IntervalMap.h:633: unsigned int llvm::IntervalMapImpl::LeafNode<KeyT, ValT, N, Traits>::insertFrom(unsigned int&, unsigned int, KeyT, KeyT, ValT) [with KeyT = COMPILER::CgSlotIndex; ValT = unsigned int; unsigned int N = 9; Traits = llvm::IntervalMapInfo<COMPILER::CgSlotIndex>]: Assertion `!Traits::stopLess(b, a) && "Invalid interval"' failed.
Aborted (core dumped)

4. What is the version of this project you are using? (Required)

f855267

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions