Use rlimit_cur as rlimit_max is set to MAX_LONG
This commit is contained in:
parent
cbf271d99f
commit
609939b5ec
@ -212,7 +212,7 @@ impl AsanRuntime {
|
|||||||
};
|
};
|
||||||
assert!(unsafe { getrlimit(RLIMIT_STACK, &mut stack_rlimit as *mut rlimit) } == 0);
|
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
|
/// 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);
|
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
|
/// Determine the stack start, end for the currently running thread
|
||||||
|
Loading…
x
Reference in New Issue
Block a user