Issue #11928 has been updated by _ wanabe.

Status changed from Feedback to Open
Assignee deleted (Yuki Nishijima)

With the just experimental patch, I didn't encounter SEGV. 
I suspect about GC mark matter of T_IMEMO iseq, referenced by `NameError#local_variables`.

```
diff --git a/gc.c b/gc.c
index 874cb98..e34da14 100644
--- a/gc.c
+++ b/gc.c
@@ -2064,6 +2064,10 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
 #endif
 #endif
 
+    if (BUILTIN_TYPE(obj) == T_IMEMO && imemo_type(obj) == imemo_iseq) {
+       return 1;
+    }
+
     switch (BUILTIN_TYPE(obj)) {
       case T_OBJECT:
        if (!(RANY(obj)->as.basic.flags & ROBJECT_EMBED) &&
```

I changed the status and the assignee because this seem not to be a did_you_mean matter.

----------------------------------------
Bug #11928: Segmentation fault in did_you_mean extension
https://bugs.ruby-lang.org/issues/11928#change-56049

* Author: Adam Wrbel
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
* Backport: 2.3: UNKNOWN
----------------------------------------
I'm getting a segmentation fault in my Rails application test suite if I attempt to use an undefined method/object.

I was not able to reproduce this outside of the complex environment of my application, but hopefully you might be able to figure out what is going on just using the crash logs. I had to filter out lines that contained file paths of my application - fortunately they were only in the "Loaded features" section and not anywhere in C or Ruby backtraces.

---Files--------------------------------
did_you_mean_clean.log (300 KB)
ruby_2015-12-27-133453_iMac.crash (26.4 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>