Halide icon indicating copy to clipboard operation
Halide copied to clipboard

WasmExecutor.cpp clobbers memory for buffers with negative strides

Open abadams opened this issue 3 years ago • 1 comments

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.

abadams avatar Mar 31 '22 16:03 abadams

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.)

steven-johnson avatar Mar 31 '22 17:03 steven-johnson