Perform jumpdest analysis whenever entering a new context (#1049)

This commit is contained in:
wborgeaud 2023-05-18 15:48:43 +02:00 committed by GitHub
parent 971bfba64a
commit d57b62fff3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -323,6 +323,13 @@ call_insufficient_balance:
DUP1 // new_ctx
SET_CONTEXT
%checkpoint // Checkpoint
// Perform jumpdest analyis
PUSH %%after
%mload_context_metadata(@CTX_METADATA_CODE_SIZE)
GET_CONTEXT
// stack: ctx, code_size, retdest
%jump(jumpdest_analysis)
%%after:
PUSH 0 // jump dest
EXIT_KERNEL
// (Old context) stack: new_ctx