You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but this can create UB by blowing past the end of the allocated memory when doing m3ApiGetArgMem. Simply blowing past the allocation is enough to make it UB, regardless of the presence of m3ApiCheckMem.
This entire m3ApiGetArgMem API is extremely error-prone.
The text was updated successfully, but these errors were encountered:
m3ApiCheckMem seems inherently unsound too, as in most cases you'd either be passing valid pointers which pass the mem check, or you'd be passing invalid pointers which are UB. so that would have to be replaced.
alternatively: instead of getting rid of m3ApiGetArgMem, we could bake m3ApiCheckMem into it, but without the UB, and get rid of m3ApiCheckMem instead.
edit: hmm m3ApiCheckMem actually looks fine for use on arrays... but the initial m3ApiGetArgMem should have its own checks.
The wasi implementation is full of code like (e.g.)
but this can create UB by blowing past the end of the allocated memory when doing
m3ApiGetArgMem
. Simply blowing past the allocation is enough to make it UB, regardless of the presence ofm3ApiCheckMem
.This entire
m3ApiGetArgMem
API is extremely error-prone.The text was updated successfully, but these errors were encountered: