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

ruby-changes:11875

From: yugui <ko1@a...>
Date: Fri, 22 May 2009 18:49:38 +0900 (JST)
Subject: [ruby-changes:11875] Ruby:r23534 (ruby_1_9_1): merges r23472 from trunk into ruby_1_9_1.

yugui	2009-05-22 18:49:19 +0900 (Fri, 22 May 2009)

  New Revision: 23534

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23534

  Log:
    merges r23472 from trunk into ruby_1_9_1.
    --
    * vm.c (rb_vm_get_sourceline): should not access out of bound.

  Modified files:
    branches/ruby_1_9_1/ChangeLog
    branches/ruby_1_9_1/version.h
    branches/ruby_1_9_1/vm.c

Index: ruby_1_9_1/ChangeLog
===================================================================
--- ruby_1_9_1/ChangeLog	(revision 23533)
+++ ruby_1_9_1/ChangeLog	(revision 23534)
@@ -1,3 +1,7 @@
+Sun May 17 13:15:32 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* vm.c (rb_vm_get_sourceline): should not access out of bound.
+
 Sun May 17 09:31:05 2009  Masaki Suketa  <masaki.suketa@n...>
 
 	* ext/win32ole/win32ole.c (foletypelib_name): should return
Index: ruby_1_9_1/vm.c
===================================================================
--- ruby_1_9_1/vm.c	(revision 23533)
+++ ruby_1_9_1/vm.c	(revision 23534)
@@ -672,11 +672,12 @@
     const rb_iseq_t *iseq = cfp->iseq;
 
     if (RUBY_VM_NORMAL_ISEQ_P(iseq)) {
-	int i;
-	int pos = cfp->pc - cfp->iseq->iseq_encoded;
+	rb_num_t i;
+	size_t pos = cfp->pc - cfp->iseq->iseq_encoded;
 
 	for (i = 0; i < iseq->insn_info_size; i++) {
 	    if (iseq->insn_info_table[i].position == pos) {
+		if (i == 0) goto found;
 		line_no = iseq->insn_info_table[i - 1].line_no;
 		goto found;
 	    }
@@ -1462,7 +1463,7 @@
 static int thread_recycle_stack_count = 0;
 
 static VALUE *
-thread_recycle_stack(int size)
+thread_recycle_stack(size_t size)
 {
     if (thread_recycle_stack_count) {
 	return thread_recycle_stack_slot[--thread_recycle_stack_count];
@@ -1675,7 +1676,7 @@
 {
     NODE *newbody;
     VALUE klass = cref->nd_clss;
-    int noex = cref->nd_visi;
+    int noex = (int)cref->nd_visi;
     rb_iseq_t *miseq;
     GetISeqPtr(iseqval, miseq);
 
Index: ruby_1_9_1/version.h
===================================================================
--- ruby_1_9_1/version.h	(revision 23533)
+++ ruby_1_9_1/version.h	(revision 23534)
@@ -1,6 +1,6 @@
 #define RUBY_VERSION "1.9.1"
 #define RUBY_RELEASE_DATE "2009-05-12"
-#define RUBY_PATCHLEVEL 148
+#define RUBY_PATCHLEVEL 149
 #define RUBY_VERSION_MAJOR 1
 #define RUBY_VERSION_MINOR 9
 #define RUBY_VERSION_TEENY 1

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

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