Fix an off-by-one in an assertion on fasttrap tracepoint sizes.

FASTTRAP_MAX_INSTR_SIZE is the largest valid value of a tracepoint, so
correct the assertion accordingly. This limit was hit with a 15-byte NOP.

Reported by:	bdrewery
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
This commit is contained in:
Mark Johnston 2017-01-27 17:58:41 +00:00
parent 290511163d
commit da5320b9d0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=312893

View File

@ -1616,7 +1616,7 @@ fasttrap_pid_probe(struct reg *rp)
* a signal we can reset the value of the scratch register.
*/
ASSERT(tp->ftt_size < FASTTRAP_MAX_INSTR_SIZE);
ASSERT(tp->ftt_size <= FASTTRAP_MAX_INSTR_SIZE);
curthread->t_dtrace_scrpc = addr;
bcopy(tp->ftt_instr, &scratch[i], tp->ftt_size);