[#42] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...>

32 messages 2002/05/25
[#43] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/05/26

Hi,

[#45] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/05/26

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#46] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/05/26

Hi,

[#47] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/05/26

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#48] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/05/26

>>>>> "t" == ts <decoux@moulon.inra.fr> writes:

[#49] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/05/27

Hi,

[#50] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/05/27

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#51] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/05/27

Hi,

[#52] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/05/27

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#53] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/05/27

Hi,

[#54] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/05/27

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#55] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/05/27

Hi,

[#56] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/05/27

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#57] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/05/28

Hi,

[#65] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/05/28

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#84] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/05/29

Hi,

[#92] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/05/29

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#67] The warns-a-thon continues... — Sean Chittenden <sean@...>

I'm feeling left out in this race to clobber warnings!!! Attached are

19 messages 2002/05/28

[#104] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...>

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

29 messages 2002/05/30
[#105] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/05/30

Hi,

[#125] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/06/04

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#126] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/06/04

Hi,

[#127] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/06/04

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#130] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/06/04

Hi,

[#132] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/06/05

Hi,

[#134] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/06/05

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

Long fmt?

From: Michal Rokos <m.rokos@...>
Date: 2002-05-22 21:58:04 UTC
List: ruby-core #32
Hi,

	shouldn't be in rb_raise and other places stated %ld instaed of
	%d for 'long' arguments?

		Michal

PS: Something like:

Index: array.c
===================================================================
RCS file: /src/ruby/array.c,v
retrieving revision 1.81
diff -u -r1.81 array.c
--- array.c	2002/04/24 04:54:13	1.81
+++ array.c	2002/05/16 10:01:39
@@ -156,7 +156,7 @@
     long i;
 
     if (n < 0) {
-	rb_raise(rb_eIndexError, "negative number of items(%d)", n);
+	rb_raise(rb_eIndexError, "negative number of items(%ld)", n);
     }
     ary = rb_ary_new2(n<ARY_DEFAULT_SIZE?ARY_DEFAULT_SIZE:n);
 
@@ -292,7 +292,7 @@
     if (idx < 0) {
 	idx += RARRAY(ary)->len;
 	if (idx < 0) {
-	    rb_raise(rb_eIndexError, "index %d out of array",
+	    rb_raise(rb_eIndexError, "index %ld out of array",
 		     idx - RARRAY(ary)->len);
 	}
     }
@@ -569,7 +569,7 @@
 	    return rb_yield(pos);
 	}
 	if (argc == 1) {
-	    rb_raise(rb_eIndexError, "index %d out of array", idx);
+	    rb_raise(rb_eIndexError, "index %ld out of array", idx);
 	}
 	return ifnone;
     }
@@ -648,13 +648,13 @@
     rpl = rb_ary_to_ary(rpl);
     rlen = RARRAY(rpl)->len;
 
-    if (len < 0) rb_raise(rb_eIndexError, "negative length %d", len);
+    if (len < 0) rb_raise(rb_eIndexError, "negative length %ld", len);
     if (beg < 0) {
 	beg += RARRAY(ary)->len;
     }
     if (beg < 0) {
 	beg -= RARRAY(ary)->len;
-	rb_raise(rb_eIndexError, "index %d out of array", beg);
+	rb_raise(rb_eIndexError, "index %ld out of array", beg);
     }
     if (beg + len > RARRAY(ary)->len) {
 	len = RARRAY(ary)->len - beg;
Index: class.c
===================================================================
RCS file: /src/ruby/class.c,v
retrieving revision 1.40
diff -u -r1.40 class.c
--- class.c	2002/04/25 13:55:58	1.40
+++ class.c	2002/05/16 10:01:40
@@ -694,7 +694,7 @@
 	SPECIAL_SINGLETON(Qnil, rb_cNilClass);
 	SPECIAL_SINGLETON(Qfalse, rb_cFalseClass);
 	SPECIAL_SINGLETON(Qtrue, rb_cTrueClass);
-	rb_bug("unknown immediate %d", obj);
+	rb_bug("unknown immediate %ld", obj);
     }
 
     DEFER_INTS;
Index: eval.c
===================================================================
RCS file: /src/ruby/eval.c,v
retrieving revision 1.294
diff -u -r1.294 eval.c
--- eval.c	2002/05/16 05:53:14	1.294
+++ eval.c	2002/05/16 10:01:45
@@ -3767,13 +3767,13 @@
 	if ((state = EXEC_TAG()) == 0) {
 	    if (block->var == (NODE*)1) {
 		if (pcall && RARRAY(val)->len != 0) {
-		    rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)",
+		    rb_raise(rb_eArgError, "wrong number of arguments (%ld for 0)",
 			     RARRAY(val)->len);
 		}
 	    }
 	    else if (block->var == (NODE*)2) {
 		if (TYPE(val) == T_ARRAY && RARRAY(val)->len != 0) {
-		    rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)",
+		    rb_raise(rb_eArgError, "wrong number of arguments (%ld for 0)",
 			     RARRAY(val)->len);
 		}
 	    }
@@ -3895,7 +3895,7 @@
     int pcall;
 {
     NODE *list;
-    int i = 0, len;
+    long i = 0, len;
 
     if (!pcall) {
 	val = svalue_to_mvalue(val);
@@ -3934,7 +3934,7 @@
 	i++;
 	list = list->nd_next;
     }
-    rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)", len, i);
+    rb_raise(rb_eArgError, "wrong number of arguments (%ld for %ld)", len, i);
 }
 
 static void
Index: numeric.c
===================================================================
RCS file: /src/ruby/numeric.c,v
retrieving revision 1.48
diff -u -r1.48 numeric.c
--- numeric.c	2002/05/14 06:22:26	1.48
+++ numeric.c	2002/05/16 10:01:46
@@ -891,7 +891,7 @@
     long num = rb_num2long(val);
 
     if (num < INT_MIN || INT_MAX < num) {
-	rb_raise(rb_eRangeError, "integer %d too big to convert to `int'", num);
+	rb_raise(rb_eRangeError, "integer %ld too big to convert to `int'", num);
     }
     return (int)num;
 }
@@ -903,7 +903,7 @@
     long num = FIXNUM_P(val)?FIX2LONG(val):rb_num2long(val);
 
     if (num < INT_MIN || INT_MAX < num) {
-	rb_raise(rb_eRangeError, "integer %d too big to convert to `int'", num);
+	rb_raise(rb_eRangeError, "integer %ld too big to convert to `int'", num);
     }
     return (int)num;
 }
@@ -933,7 +933,7 @@
 
     v = rb_num2long(val);
     if (!FIXABLE(v))
-	rb_raise(rb_eRangeError, "integer %d out of range of fixnum", v);
+	rb_raise(rb_eRangeError, "integer %ld out of range of fixnum", v);
     return INT2FIX(v);
 }
 
@@ -1027,7 +1027,7 @@
     long i = NUM2LONG(num);
 
     if (i < 0 || 0xff < i)
-	rb_raise(rb_eRangeError, "%d out of char range", i);
+	rb_raise(rb_eRangeError, "%ld out of char range", i);
     c = i;
     return rb_str_new(&c, 1);
 }
Index: pack.c
===================================================================
RCS file: /src/ruby/pack.c,v
retrieving revision 1.37
diff -u -r1.37 pack.c
--- pack.c	2002/05/14 06:22:26	1.37
+++ pack.c	2002/05/16 10:01:47
@@ -338,7 +338,7 @@
     char *p, *pend;
     VALUE res, from, associates = 0;
     char type;
-    int items, len, idx;
+    long items, len, idx;
     char *ptr;
     int plen;
 #ifdef NATINT_PACK
@@ -824,7 +824,7 @@
 	    if (!NIL_P(from)) {
 		StringValue(from);
 		if (RSTRING(from)->len < len) {
-		    rb_raise(rb_eArgError, "too short buffer for P(%d for %d)",
+		    rb_raise(rb_eArgError, "too short buffer for P(%ld for %ld)",
 			     RSTRING(from)->len, len);
 		}
 	    }
Index: parse.y
===================================================================
RCS file: /src/ruby/parse.y,v
retrieving revision 1.170
diff -u -r1.170 parse.y
--- parse.y	2002/05/14 06:22:26	1.170
+++ parse.y	2002/05/16 10:01:49
@@ -4944,7 +4944,7 @@
 	return node2;
 
       default:
-	rb_bug("unknown nodetype(%d) for arg_prepend");
+	rb_bug("unknown nodetype(%d) for arg_prepend", nodetype(node2));
     }
     return 0;			/* not reached */
 }
Index: range.c
===================================================================
RCS file: /src/ruby/range.c,v
retrieving revision 1.35
diff -u -r1.35 range.c
--- range.c	2002/05/14 06:22:26	1.35
+++ range.c	2002/05/16 10:01:49
@@ -401,7 +401,7 @@
 
   out_of_range:
     if (err) {
-	rb_raise(rb_eRangeError, "%d..%s%d out of range",
+	rb_raise(rb_eRangeError, "%ld..%s%ld out of range",
 		 b, EXCL(range)? "." : "", e);
     }
     return Qnil;
Index: string.c
===================================================================
RCS file: /src/ruby/string.c,v
retrieving revision 1.102
diff -u -r1.102 string.c
--- string.c	2002/04/24 04:54:14	1.102
+++ string.c	2002/05/16 10:01:51
@@ -1198,10 +1198,10 @@
     long len;
     VALUE val;
 {
-    if (len < 0) rb_raise(rb_eIndexError, "negative length %d", len);
+    if (len < 0) rb_raise(rb_eIndexError, "negative length %ld", len);
     if (RSTRING(str)->len < beg) {
       out_of_range:
-	rb_raise(rb_eIndexError, "index %d out of string", beg);
+	rb_raise(rb_eIndexError, "index %ld out of string", beg);
     }
     if (beg < 0) {
 	if (-beg > RSTRING(str)->len) {
@@ -1282,7 +1282,7 @@
 	idx = NUM2INT(indx);
 	if (RSTRING(str)->len <= idx) {
 	  out_of_range:
-	    rb_raise(rb_eIndexError, "index %d out of string", idx);
+	    rb_raise(rb_eIndexError, "index %ld out of string", idx);
 	}
 	if (idx < 0) {
 	    if (-idx > RSTRING(str)->len)

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Michal Rokos                         Czech Technical University, Prague
E-mail:m.rokos@sh.cvut.cz  ICQ:36118339  Jabber:majkl@jabber.sh.cvut.cz
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

In This Thread

Prev Next