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:
Yukihiro "Matz" Matsumoto
2023-09-28 21:11:03 +09:00
parent 771b56c796
commit b9536ea35f
+4
View File
@@ -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. */