Skip to content

weak/wrong internal checks for valid devices

In the file memman_c.cpp.tmpl there are many internal checks of the kind

if (device_ctx > user_device_ctxs.size()) {
   return -1;
}

However, according to the function mm_device_ctx_is_valid an invalid device should be identified by the complement of dev_ctx < user_device_ctxs.size() which would require the >= operator. Thus, checks using the > operator like above seem wrong.

Edited by Joerg Behrens
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information