diff options
author | Urabe, Shyouhei <shyouhei@ruby-lang.org> | 2019-04-23 17:55:15 +0900 |
---|---|---|
committer | Urabe, Shyouhei <shyouhei@ruby-lang.org> | 2019-04-26 15:59:40 +0900 |
commit | 1f4204a762b2ddcc2f235b1a2b6a10071ef90d3b (patch) | |
tree | 21584b192ac5a93f81e5684384bdc0021651706e /gc.c | |
parent | bdd1b300f8bf540c8f237cce50e42991f94101e3 (diff) |
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.
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; |