mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
extend machine stacks when sanitizers are there
It seems sanitizers require extra amount of machine stacks. Without extending them the process tends to stack overflow.
This commit is contained in:
parent
1f4204a762
commit
fa09acafde
1 changed files with 12 additions and 0 deletions
12
vm_core.h
12
vm_core.h
|
@ -698,6 +698,18 @@ typedef struct rb_vm_struct {
|
|||
#define RUBY_VM_FIBER_MACHINE_STACK_SIZE_MIN ( 16 * 1024 * sizeof(VALUE)) /* 64 KB or 128 KB */
|
||||
#endif
|
||||
|
||||
#if __has_feature(memory_sanitizer) || __has_feature(address_sanitizer)
|
||||
/* It seems sanitizers consume A LOT of machine stacks */
|
||||
#undef RUBY_VM_THREAD_MACHINE_STACK_SIZE
|
||||
#define RUBY_VM_THREAD_MACHINE_STACK_SIZE (1024 * 1024 * sizeof(VALUE))
|
||||
#undef RUBY_VM_THREAD_MACHINE_STACK_SIZE_MIN
|
||||
#define RUBY_VM_THREAD_MACHINE_STACK_SIZE_MIN ( 512 * 1024 * sizeof(VALUE))
|
||||
#undef RUBY_VM_FIBER_MACHINE_STACK_SIZE
|
||||
#define RUBY_VM_FIBER_MACHINE_STACK_SIZE ( 256 * 1024 * sizeof(VALUE))
|
||||
#undef RUBY_VM_FIBER_MACHINE_STACK_SIZE_MIN
|
||||
#define RUBY_VM_FIBER_MACHINE_STACK_SIZE_MIN ( 128 * 1024 * sizeof(VALUE))
|
||||
#endif
|
||||
|
||||
/* optimize insn */
|
||||
#define INTEGER_REDEFINED_OP_FLAG (1 << 0)
|
||||
#define FLOAT_REDEFINED_OP_FLAG (1 << 1)
|
||||
|
|
Loading…
Add table
Reference in a new issue