Skip to content

addActiveElementSegment out of bound #96

Description

@niu2x

by

console.log("e.table", e.table, data.length)
console.log("table", binaryen.getTableInfo(this.module.getTable(e.table)))

output

e.table 0 185325
table { name: '0', module: '', base: '', initial: 185326, max: 185326 }

we know table's capacity is 185326. data length is 185325.

then, call addActiveElementSegment

this.module.addActiveElementSegment(e.table, this.module.i32.const(0), data)

it is crash


RangeError: offset is out of bounds
    at Int32Array.set (<anonymous>)
    at H (file:///home/niu2x/project/wasm-knife/node_modules/binaryen/index.js:7:9932452)
    at file:///home/niu2x/project/wasm-knife/node_modules/binaryen/index.js:7:9980342
    at R (file:///home/niu2x/project/wasm-knife/node_modules/binaryen/index.js:7:9932359)
    at HA.I.addActiveElementSegment (file:///home/niu2x/project/wasm-knife/node_modules/binaryen/index.js:7:9980289)

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