* attribute: fix slice related function bug Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com> Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com> Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>