Skip to content

Invalid Hook test for "payload too large" #669

@tequdev

Description

@tequdev

The "payload too large" test is resulting in temMALFORMED due to the presence of memcpy, rather than the length of the payload itself.

env(ripple::test::jtx::hook(alice, {{hso(long_wasm)}}, 0),

(module
  (type (;0;) (func (param i32 i32) (result i32)))
  (type (;1;) (func (param i32 i32 i32) (result i32)))
  (type (;2;) (func (param i32 i32 i64) (result i64)))
  (type (;3;) (func (param i32) (result i64)))
  (import "env" "_g" (func (;0;) (type 0)))
  (import "env" "memcpy" (func (;1;) (type 1)))
  (import "env" "accept" (func (;2;) (type 2)))
  (func (;3;) (type 3) (param i32) (result i64)
    (local i32 i64)
    global.get 0
    i32.const 66016
    i32.sub
    local.tee 1
    global.set 0
    i32.const 1
    i32.const 1
    call 0
    drop
    local.get 1
    i32.const 1024
    i32.const 66001
    call 1
    local.tee 1
    i32.const 66001
    i64.const 0
    call 2
    local.set 2
    local.get 1
    i32.const 66016
    i32.add
    global.set 0
    local.get 2)
  (memory (;0;) 3)
  (global (;0;) (mut i32) (i32.const 132576))
  (global (;1;) i32 (i32.const 67025))
  (global (;2;) i32 (i32.const 1024))
  (global (;3;) i32 (i32.const 132576))
  (global (;4;) i32 (i32.const 1024))
  (export "hook" (func 3))
  (data (;0;) (i32.const 1024) "......"))

Metadata

Metadata

Assignees

No one assigned

    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