New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] ulab array corruption with slices #387
Comments
So, would it be enough, if, in micropython-ulab/code/ndarray.h Lines 73 to 83 in 90824d2
void *origin , and then inmicropython-ulab/code/ndarray.c Lines 767 to 785 in 90824d2
simply had ndarray->origin = source->origin; Of course, we also have to set micropython-ulab/code/ndarray.c Line 691 in 90824d2
ndarray->origin = array; Since |
As reported by @kevinjwaters at adafruit/circuitpython#4753, there seems to be a problem with memory corruption when ulab arrays are sliced.
I am in a fresh, up to date clone of ulab master branch (90824d2), ran
./build.py
.I put the following content in
gcproblem.py
:then I run
./micropython/ports/unix/micropython gcproblem.py
:The first two lines of output are correct, the second two are wrong.
I notice the following detail about how memoryview works (
py/objarray.c
in the micropython source code):It may be the case that a form of this trick needs to be followed in ulab.
The text was updated successfully, but these errors were encountered: