From c32fd1b5ed6709dfbed3d19cac881886576e231b Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Mon, 23 Sep 2024 11:56:29 -0400 Subject: Add debugging code to vm_objtostring in ASAN To debug this issue on CI: http://ci.rvm.jp/logfiles/brlog.trunk_asan.20240922-002945 --- vm_insnhelper.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 543f31a3b1..8174d7ee9a 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -6056,6 +6056,13 @@ VALUE rb_mod_name(VALUE); static VALUE vm_objtostring(const rb_iseq_t *iseq, VALUE recv, CALL_DATA cd) { + // Debugging code for ASAN issues such as: + // http://ci.rvm.jp/logfiles/brlog.trunk_asan.20240922-002945 + if (asan_poisoned_object_p(recv)) { + asan_unpoison_object(recv, false); + rb_bug("vm_objtostring: recv is poisoned (type %d)", TYPE(recv)); + } + int type = TYPE(recv); if (type == T_STRING) { return recv; -- cgit v1.2.3