Halide
Halide copied to clipboard
WasmExecutor.cpp clobbers memory for buffers with negative strides
In various places it has memcpy calls that assume buf->host is the lowest address in memory for that buffer.
Negative strides are not tested, so it's not surprising that they don't work everywhere. Mostly opening this issue as a note for something that would need fixing if we supported them properly.
Yikes. Sorry about that. Clearly we are overdue to add proper testing for negative (and zero) strides, and to explicitly document that they are legal. (Or, alternately, to forbid them, but not sure why we'd want to do that.)