[前][次][番号順一覧][スレッド一覧]

ruby-changes:50627

From: nobu <ko1@a...>
Date: Sat, 17 Mar 2018 11:11:12 +0900 (JST)
Subject: [ruby-changes:50627] nobu:r62787 (trunk): debugging SEGV on Solaris11s

nobu	2018-03-17 11:11:06 +0900 (Sat, 17 Mar 2018)

  New Revision: 62787

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62787

  Log:
    debugging SEGV on Solaris11s

  Modified files:
    trunk/compile.c
Index: compile.c
===================================================================
--- compile.c	(revision 62786)
+++ compile.c	(revision 62787)
@@ -8140,6 +8140,13 @@ rb_method_for_self_aset(VALUE name, VALU https://github.com/ruby/ruby/blob/trunk/compile.c#L8140
 
 /* ISeq binary format */
 
+#ifdef __sparc
+#define IBF_ISEQ_DEBUG 1
+#endif
+#ifndef IBF_ISEQ_DEBUG
+#define IBF_ISEQ_DEBUG 0
+#endif
+
 typedef unsigned int ibf_offset_t;
 #define IBF_OFFSET(ptr) ((ibf_offset_t)(VALUE)(ptr))
 
@@ -9537,6 +9544,17 @@ ibf_load_iseq_complete(rb_iseq_t *iseq) https://github.com/ruby/ruby/blob/trunk/compile.c#L9544
     struct ibf_load *load = RTYPEDDATA_DATA(iseq->aux.loader.obj);
     rb_iseq_t *prev_src_iseq = load->iseq;
     load->iseq = iseq;
+#if IBF_ISEQ_DEBUG
+    fprintf(stderr, "ibf_load_iseq_complete: load=%p iseq=%p prev=%p\n",
+	    load, iseq, prev_src_iseq);
+    fprintf(stderr, "ibf_load_iseq_complete: list=%p(%p+%x) index=%i/%u\n",
+	    ibf_iseq_list(load),
+	    load->buff, load->header->iseq_list_offset,
+	    iseq->aux.loader.index, load->header->iseq_list_size);
+    fprintf(stderr, "ibf_load_iseq_complete: offset=%u size=%u\n",
+	    ibf_iseq_list(load)[iseq->aux.loader.index],
+	    load->header->size);
+#endif
     ibf_load_iseq_each(load, iseq, ibf_iseq_list(load)[iseq->aux.loader.index]);
     ISEQ_COMPILE_DATA_CLEAR(iseq);
     FL_UNSET(iseq, ISEQ_NOT_LOADED_YET);
@@ -9552,13 +9570,6 @@ rb_iseq_complete(const rb_iseq_t *iseq) https://github.com/ruby/ruby/blob/trunk/compile.c#L9570
 }
 #endif
 
-#ifdef __sparc
-#define IBF_ISEQ_DEBUG 1
-#endif
-#ifndef IBF_ISEQ_DEBUG
-#define IBF_ISEQ_DEBUG 0
-#endif
-
 static rb_iseq_t *
 ibf_load_iseq(const struct ibf_load *load, const rb_iseq_t *index_iseq)
 {

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]