1

Okay I'm about to do something diabolical

Anybody knows if reading beyond the bounds of an allocation is UB in llvm when I'm doing the read via inline assembly? 👀

Comments
  • 2
    Stop molesting those poor allocations!
  • 1
    why would you even have a need for such magic
  • 1
    @jestdotty It's useful when you're running some wide algorithm over variable length data, e.g. utf 8 decoding where instead of reading each byte on its own you read the entire (potential) 4 bytes as one uint. Obviously for the last 3 bytes this would require reading past the end of the allocation

    Though I think it's easier to just have both functions, one for the interior of the buffer and then one that handles the tail...
  • 0
    @12bitfloat if I understood that correctly I think I typically make arrays into buffers not the other way around
Add Comment