summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-17 02:11:06 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-17 02:11:06 +0000
commit952b70e22171305abcd124859b5f278f36d59ced (patch)
treebe72ce6014a48a04c3a82c8726f4f278f4b2ebb9 /compile.c
parent73b631ddd84b2a027dcdfa44ed900985da64e596 (diff)
debugging SEGV on Solaris11s
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/compile.c b/compile.c
index 5293b32695..303054e6de 100644
--- a/compile.c
+++ b/compile.c
@@ -8140,6 +8140,13 @@ rb_method_for_self_aset(VALUE name, VALUE arg, rb_insn_func_t func)
/* 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)
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)
}
#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)
{