What this PR does / why we need it (en: English/zh: Chinese):
en: There are a few cases that lastArgs.cap == 0 but lastArg.len == MAX_INT when calling variadic functions (arm64). Currently we have no idea how it happens. In that case we assume that lastArgs.len should less than lastArg.cap
zh: 在一些极少情况下mock可变长参数的函数,调用时最后的变长参数slice的len会变得很大,但是cap为0。目前还不清楚为什么slice的len被踩坏了,这里先做一个校验,如果len>cap的话按照cap长度调用mock函数
Change-Id: Ic9ac689e33484828b27adeca2d342e87c4230362
What type of PR is this?
fix
What this PR does / why we need it (en: English/zh: Chinese):
en: There are a few cases that
lastArgs.cap == 0
butlastArg.len == MAX_INT
when calling variadic functions (arm64). Currently we have no idea how it happens. In that case we assume thatlastArgs.len
should less thanlastArg.cap
zh: 在一些极少情况下mock可变长参数的函数,调用时最后的变长参数slice的len会变得很大,但是cap为0。目前还不清楚为什么slice的len被踩坏了,这里先做一个校验,如果len>cap的话按照cap长度调用mock函数Which issue(s) this PR fixes: