From d39a01caf4cbbc22cddbaa23234622b21412f058 Mon Sep 17 00:00:00 2001 From: Guillaume Melquiond Date: Wed, 17 Feb 2021 12:13:32 +0100 Subject: Be less permissive with respect to nonsensical bytecode. --- kernel/byterun/coq_fix_code.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'kernel') diff --git a/kernel/byterun/coq_fix_code.c b/kernel/byterun/coq_fix_code.c index f986095f59..20890a28dc 100644 --- a/kernel/byterun/coq_fix_code.c +++ b/kernel/byterun/coq_fix_code.c @@ -108,9 +108,7 @@ value coq_tcode_of_code (value code) { opcode_t instr; COPY32(&instr,p); p++; - if (instr < 0 || instr > STOP){ - instr = STOP; - }; + if (instr < 0 || instr > STOP) abort(); *q++ = VALINSTR(instr); if (instr == SWITCH) { uint32_t i, sizes, const_size, block_size; @@ -127,8 +125,9 @@ value coq_tcode_of_code (value code) { q++; for(i=1; i