Too huge st_table should raise exception

e$B1sF#$G$9!#e(B

e$B:#$Ne(B st.c e$B$OMWAG$N?t$,e(B 1073741824 + 85 e$B8D$rD6$($k$He(B
e$B$J$s$+JQ$J$3$H$K$J$kM=46$,$7$^$9!#e(B

e$B3N$+$a$k$3$H$O$G$-$^$;$s$,!"0J2<$N$h$&$KNc30$rEj$2$Fe(B
e$B$*$$$F$b$$$$$G$7$g$&$+!#e(B

Index: st.c

— st.c (revision 19398)
+++ st.c (working copy)
@@ -6,9 +6,7 @@
#include “regint.h”
#include “st.h”
#else
-#include “ruby/config.h”
-#include “ruby/defines.h”
-#include “ruby/st.h”
+#include “ruby/ruby.h”
#endif

#include <stdio.h>
@@ -135,6 +133,9 @@
if (newsize > size) return primes[i];
}
/* Ran out of polynomials */
+#ifndef NOT_RUBY

  • rb_raise(rb_eRuntimeError, “st_table too big”);
    +#endif
    return -1; /* should raise exception */
    #endif
    }

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:36354] too huge st_table should raise
exception”
on Thu, 18 Sep 2008 00:25:13 +0900, “Yusuke ENDOH” [email protected]
writes:

|e$B:#$Ne(B st.c e$B$OMWAG$N?t$,e(B 1073741824 + 85 e$B8D$rD6$($k$He(B
|e$B$J$s$+JQ$J$3$H$K$J$kM=46$,$7$^$9!#e(B
|
|e$B3N$+$a$k$3$H$O$G$-$^$;$s$,!"0J2<$N$h$&$KNc30$rEj$2$Fe(B
|e$B$*$$$F$b$$$$$G$7$g$&$+!#e(B

e$B$$$$$s$8$c$J$$$G$7$g$&$+!#e(B

e$B1sF#$G$9!#e(B

2008/09/18 17:52 Yukihiro M. [email protected]:

e$B$$$$$s$8$c$J$$$G$7$g$&$+!#e(B

e$B$"$j$,$H$&$4$6$$$^$9!#%3%_%C%H$7$^$7$?!#e(B