From 609939b5ec7b17d8b3967f0eaeaed0ce313a9c63 Mon Sep 17 00:00:00 2001 From: s1341 Date: Wed, 9 Jun 2021 10:36:15 +0300 Subject: [PATCH] Use rlimit_cur as rlimit_max is set to MAX_LONG --- libafl_frida/src/asan_rt.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libafl_frida/src/asan_rt.rs b/libafl_frida/src/asan_rt.rs index 20f7682701..e0febf11cc 100644 --- a/libafl_frida/src/asan_rt.rs +++ b/libafl_frida/src/asan_rt.rs @@ -212,7 +212,7 @@ impl AsanRuntime { }; assert!(unsafe { getrlimit(RLIMIT_STACK, &mut stack_rlimit as *mut rlimit) } == 0); - stack_rlimit.rlim_max as usize + stack_rlimit.rlim_cur as usize } /// Get the maximum stack size for the current stack @@ -225,7 +225,7 @@ impl AsanRuntime { }; assert!(unsafe { getrlimit64(RLIMIT_STACK, &mut stack_rlimit as *mut rlimit64) } == 0); - stack_rlimit.rlim_max as usize + stack_rlimit.rlim_cur as usize } /// Determine the stack start, end for the currently running thread