3 ms·
My concern is, if decode fails I need to debug WASM added by some other party maybe containing random bugs. Maybe a library of standard decoders maintained and
by anygivnthursday 4mo ago
My concern is, if decode fails I need to debug WASM added by some other party maybe containing random bugs. Maybe a library of standard decoders maintained and tested by the project could help, but then not sure if it kills the advantage of the flexibility it provides.
- titzer 4mo agoBut Wasm has deterministic execution, so if decode fails for you, it should have failed for them. I.e. it's not a problem that your system has introduced; they should be able to reproduce the failure independent of any client.
- anygivnthursday 4mo agoYes, if it comes from some reliable partner I can report bugs to, or something built in-house. In such environment probably fine. And maybe thats the main audience and not some open data exchange format where your system may be brought down by someone's random decoder.
- ChadNauseam 4mo agoBut the WASM is integrated into the file. So what scenario would happen where the decode fails? They wrote a file, wrote a wasm decoder, and didn't test the decoder against the file they just wrote? I think it would be a natural step as part of the publish pipeline to run the decoder against the file and compare the output against the source to ensure correctness.
- anygivnthursday 4mo agoThats what a reliable party would do certainly, which was my point above. But there is no guarantee really. And there may be people testing their decoder on some test data then attaching it to whatever data they send without testing edge cases. Its like testing recovery from backups, people who care do it, many people dont.