diff options
| author | Peter Zhu <peter@peterzhu.ca> | 2024-09-23 11:56:29 -0400 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2024-09-25 11:00:04 -0400 |
| commit | c32fd1b5ed6709dfbed3d19cac881886576e231b (patch) | |
| tree | 22cf470fdcf96daba881851a77e0b67f7a20e65b | |
| parent | ecbc4a67c973f512a5876c44efc2ec03ad92b1b6 (diff) | |
Add debugging code to vm_objtostring in ASAN
To debug this issue on CI:
http://ci.rvm.jp/logfiles/brlog.trunk_asan.20240922-002945
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11667
| -rw-r--r-- | vm_insnhelper.c | 7 |
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; |
