mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
vm.c: use smaller MRB_CALL_LEVEL_MAX with address sanitizer; fix #6068
Since ASAN uses lower memory bound. The other ideas to address #6068 might follow, e.g. removing `args=` from Enumerator.
This commit is contained in:
@@ -42,8 +42,12 @@ void abort(void);
|
||||
|
||||
/* Maximum recursive depth. Should be set lower on memory constrained systems. */
|
||||
#ifndef MRB_CALL_LEVEL_MAX
|
||||
#if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
|
||||
#define MRB_CALL_LEVEL_MAX 128
|
||||
#else
|
||||
#define MRB_CALL_LEVEL_MAX 512
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Maximum stack depth. Should be set lower on memory constrained systems.
|
||||
The value below allows about 60000 recursive calls in the simplest case. */
|
||||
|
||||
Reference in New Issue
Block a user