Viewer blindly trusts tensor dimensions and crashes if buffer is too small #3927
Labels
🪳 bug
Something isn't working
💣 crash
crash, deadlock/freeze, do-no-start
🔺 re_renderer
affects re_renderer itself
📺 re_viewer
affects re_viewer itself
Milestone
Tensors/Images take a tensor buffer. Tensor buffers have both a buffer size and a dimension. It's trivial in Rust and C++ to give a dimension that is larger than the actual buffer (it is possible, in Python if you supply tensor dimensions manually, but kinda hard). There's nothing right now that validates this.
The viewer should truncate and warn!
C++ repro case:
Curiously enough the crash only happens once we try upload textures to the gpu (would have expected to crash earlier):
The text was updated successfully, but these errors were encountered: