I noticed my browser applications crashing after a few minutes of running. The issue appears to be the dataview created during instantiation in Onyx.create(). If the webassembly memory is reallocated, the dataview is invalidated. It doesn't look like this is detected anywhere and the cached dataview remains invalid. In my workaround, I've replaced the use of instance.data with a new dataview at both use sites, ie:
load_slice_of_values: function(addr, len) {
const results = []
const data = new DataView(this.memory.buffer)
for (var i = 0; i < len; i++) {
results.push(
this.load_value(data.getBigUint64(addr + i * 8, true))
)
}
return results
},
I noticed my browser applications crashing after a few minutes of running. The issue appears to be the dataview created during instantiation in Onyx.create(). If the webassembly memory is reallocated, the dataview is invalidated. It doesn't look like this is detected anywhere and the cached dataview remains invalid. In my workaround, I've replaced the use of instance.data with a new dataview at both use sites, ie: