ruby-changes:61664
From: Peter <ko1@a...>
Date: Thu, 11 Jun 2020 09:54:22 +0900 (JST)
Subject: [ruby-changes:61664] 0213f5b08a (master): Fix ASan crash
https://git.ruby-lang.org/ruby.git/commit/?id=0213f5b08a From 0213f5b08a470d322edb54bda85523d05b2ea4c7 Mon Sep 17 00:00:00 2001 From: Peter Zhu <peter@p...> Date: Wed, 10 Jun 2020 10:17:56 -0400 Subject: Fix ASan crash diff --git a/gc.c b/gc.c index 3b2e7cd..d4ed316 100644 --- a/gc.c +++ b/gc.c @@ -11514,6 +11514,8 @@ const char * https://github.com/ruby/ruby/blob/trunk/gc.c#L11514 rb_raw_obj_info(char *buff, const int buff_size, VALUE obj) { int pos = 0; + void *poisoned = asan_poisoned_object_p(obj); + asan_unpoison_object(obj, false); #define BUFF_ARGS buff + pos, buff_size - pos #define APPENDF(f) if ((pos += snprintf f) >= buff_size) goto end @@ -11744,6 +11746,10 @@ rb_raw_obj_info(char *buff, const int buff_size, VALUE obj) https://github.com/ruby/ruby/blob/trunk/gc.c#L11746 #undef C } end: + if (poisoned) { + asan_poison_object(obj); + } + return buff; #undef APPENDF #undef BUFF_ARGS -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/