summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vm_insnhelper.c7
1 files changed, 7 insertions, 0 deletions
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;