diff options
author | Martin Storsjö <martin@martin.st> | 2020-05-13 14:11:39 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2020-05-15 21:22:36 +0300 |
commit | ed7d73355eea21e08eea01f8fabc1644f15b66e4 (patch) | |
tree | 7121e9ad368da852431ed16878f05fbe946647c4 /tests/checkasm/checkasm.h | |
parent | 6cb2d4d94bab483c7509d21891a010bfdca3e2a5 (diff) | |
download | ffmpeg-ed7d73355eea21e08eea01f8fabc1644f15b66e4.tar.gz |
checkasm: aarch64: Check for stack overflows
Also fill x8-x17 with garbage before calling the function.
Figure out the number of stack parameters and make sure that the
value on the stack after those is untouched.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'tests/checkasm/checkasm.h')
-rw-r--r-- | tests/checkasm/checkasm.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h index de9df31f44..0190bc912c 100644 --- a/tests/checkasm/checkasm.h +++ b/tests/checkasm/checkasm.h @@ -184,12 +184,15 @@ extern void (*checkasm_checked_call)(void *func, int dummy, ...); #elif ARCH_AARCH64 && !defined(__APPLE__) void checkasm_stack_clobber(uint64_t clobber, ...); void checkasm_checked_call(void *func, ...); -#define declare_new(ret, ...) ret (*checked_call)(void *, int, int, int, int, int, int, int, __VA_ARGS__)\ +#define declare_new(ret, ...) ret (*checked_call)(void *, int, int, int, int, int, int, int, __VA_ARGS__,\ + int, int, int, int, int, int, int, int,\ + int, int, int, int, int, int, int)\ = (void *)checkasm_checked_call; #define CLOB (UINT64_C(0xdeadbeefdeadbeef)) #define call_new(...) (checkasm_stack_clobber(CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,\ CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB),\ - checked_call(func_new, 0, 0, 0, 0, 0, 0, 0, __VA_ARGS__)) + checked_call(func_new, 0, 0, 0, 0, 0, 0, 0, __VA_ARGS__,\ + 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0)) #else #define declare_new(ret, ...) #define declare_new_float(ret, ...) |