Stream: git-wasmtime

Topic: wasmtime / issue #6431 Cranelift: "attempt to add with ov...


view this post on Zulip Wasmtime GitHub notifications bot (May 22 2023 at 19:24):

bjorn3 opened issue #6431:

Thanks for filing an issue! Please fill out the TODOs below.

.clif Test Case

Allocate >4GB of stack space spread over multiple stack slots.

function u0:0() system_v {
    ss0 = explicit_slot 1536000000
    ss1 = explicit_slot 1536000000
    ss2 = explicit_slot 1536000000
    ss3 = explicit_slot 1536000000

block0:
    trap user0
}

Steps to Reproduce

Expected Results

Either compiles or returns an ImplLimitExceeded error.

Actual Results

Addition overflows resulting in miscompilations in release mode compiled cranelift and crashes in debug mode compiled cranelift.

Versions and Environment

Cranelift version or commit: 0.96

Operating system: not relevant

Architecture: x86_64 and aarch64

Extra Info

The overflowing addition happens at https://github.com/bytecodealliance/wasmtime/blob/a186e4796afd0d62d53c7ab354b104b53276c847/cranelift/codegen/src/machinst/abi.rs#L1066

view this post on Zulip Wasmtime GitHub notifications bot (May 22 2023 at 19:24):

bjorn3 labeled issue #6431:

Thanks for filing an issue! Please fill out the TODOs below.

.clif Test Case

Allocate >4GB of stack space spread over multiple stack slots.

function u0:0() system_v {
    ss0 = explicit_slot 1536000000
    ss1 = explicit_slot 1536000000
    ss2 = explicit_slot 1536000000
    ss3 = explicit_slot 1536000000

block0:
    trap user0
}

Steps to Reproduce

Expected Results

Either compiles or returns an ImplLimitExceeded error.

Actual Results

Addition overflows resulting in miscompilations in release mode compiled cranelift and crashes in debug mode compiled cranelift.

Versions and Environment

Cranelift version or commit: 0.96

Operating system: not relevant

Architecture: x86_64 and aarch64

Extra Info

The overflowing addition happens at https://github.com/bytecodealliance/wasmtime/blob/a186e4796afd0d62d53c7ab354b104b53276c847/cranelift/codegen/src/machinst/abi.rs#L1066

view this post on Zulip Wasmtime GitHub notifications bot (May 22 2023 at 19:24):

bjorn3 labeled issue #6431:

Thanks for filing an issue! Please fill out the TODOs below.

.clif Test Case

Allocate >4GB of stack space spread over multiple stack slots.

function u0:0() system_v {
    ss0 = explicit_slot 1536000000
    ss1 = explicit_slot 1536000000
    ss2 = explicit_slot 1536000000
    ss3 = explicit_slot 1536000000

block0:
    trap user0
}

Steps to Reproduce

Expected Results

Either compiles or returns an ImplLimitExceeded error.

Actual Results

Addition overflows resulting in miscompilations in release mode compiled cranelift and crashes in debug mode compiled cranelift.

Versions and Environment

Cranelift version or commit: 0.96

Operating system: not relevant

Architecture: x86_64 and aarch64

Extra Info

The overflowing addition happens at https://github.com/bytecodealliance/wasmtime/blob/a186e4796afd0d62d53c7ab354b104b53276c847/cranelift/codegen/src/machinst/abi.rs#L1066

view this post on Zulip Wasmtime GitHub notifications bot (May 22 2023 at 20:49):

cfallin commented on issue #6431:

I'm working on this now and will put up a PR shortly.

view this post on Zulip Wasmtime GitHub notifications bot (May 23 2023 at 00:17):

cfallin closed issue #6431:

Thanks for filing an issue! Please fill out the TODOs below.

.clif Test Case

Allocate >4GB of stack space spread over multiple stack slots.

function u0:0() system_v {
    ss0 = explicit_slot 1536000000
    ss1 = explicit_slot 1536000000
    ss2 = explicit_slot 1536000000
    ss3 = explicit_slot 1536000000

block0:
    trap user0
}

Steps to Reproduce

Expected Results

Either compiles or returns an ImplLimitExceeded error.

Actual Results

Addition overflows resulting in miscompilations in release mode compiled cranelift and crashes in debug mode compiled cranelift.

Versions and Environment

Cranelift version or commit: 0.96

Operating system: not relevant

Architecture: x86_64 and aarch64

Extra Info

The overflowing addition happens at https://github.com/bytecodealliance/wasmtime/blob/a186e4796afd0d62d53c7ab354b104b53276c847/cranelift/codegen/src/machinst/abi.rs#L1066


Last updated: Oct 23 2024 at 20:03 UTC