Skip to content

Commit

Permalink
Fix build failure
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
  • Loading branch information
Alan Jowett committed May 13, 2024
1 parent 1b7817e commit 57ddd60
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions vm/ubpf_jit_arm64.c
Original file line number Diff line number Diff line change
Expand Up @@ -1189,6 +1189,10 @@ translate(struct ubpf_vm* vm, struct jit_state* state, char** errmsg)
*errmsg = ubpf_error("Too many LEA calculations.");
break;
}
case TooManyLocalCalls: {
*errmsg = ubpf_error("Too many local calls.");
break;
}
case UnexpectedInstruction: {
// errmsg set at time the error was detected because the message requires
// information about the unexpected instruction.
Expand Down
6 changes: 4 additions & 2 deletions vm/ubpf_jit_x86_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,10 @@ translate(struct ubpf_vm* vm, struct jit_state* state, char** errmsg)
*errmsg = ubpf_error("Too many LEA calculations");
break;
}
case TooManyLocalCalls: {
*errmsg = ubpf_error("Too many local calls");
break;
}
case UnexpectedInstruction: {
// errmsg set at time the error was detected because the message requires
// information about the unexpected instruction.
Expand Down Expand Up @@ -914,8 +918,6 @@ muldivmod(struct jit_state* state, uint8_t opcode, int src, int dst, int32_t imm
}
}

uint8_t _sub_rsp_8[] = { 0x48, 0x83, 0xec, 0x08 }; // sub rsp, 8

static bool
resolve_patchable_relatives(struct jit_state* state)
{
Expand Down

0 comments on commit 57ddd60

Please sign in to comment.