зеркало из https://github.com/github/ruby.git
disable assertion when MSAN is active
These assertions check if a newly allocated object (which is marked as an uninitialized memory region in MSAN) is in fact a T_NONE. Thus they intentionally read uninitialized memory regions, which do not interface well with MSAN. Just disalbe them.
This commit is contained in:
Родитель
bdd1b300f8
Коммит
1f4204a762
2
gc.c
2
gc.c
|
@ -1891,8 +1891,10 @@ gc_event_hook_body(rb_execution_context_t *ec, rb_objspace_t *objspace, const rb
|
|||
static inline VALUE
|
||||
newobj_init(VALUE klass, VALUE flags, VALUE v1, VALUE v2, VALUE v3, int wb_protected, rb_objspace_t *objspace, VALUE obj)
|
||||
{
|
||||
#if !__has_feature(memory_sanitizer)
|
||||
assert(BUILTIN_TYPE(obj) == T_NONE);
|
||||
assert((flags & FL_WB_PROTECTED) == 0);
|
||||
#endif
|
||||
|
||||
/* OBJSETUP */
|
||||
RBASIC(obj)->flags = flags;
|
||||
|
|
Загрузка…
Ссылка в новой задаче