Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Sun, 3 Oct 2010 09:30:30 +0000 nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823…

…fe69b080e>

 merge revision(s) 29396:
 ?\012
 	* parse.y (rb_intern): should check symbol table overflow.
 	 #3900 [ruby-dev:42330]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@29396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Signed-off-by: URABE, Shyouhei <shyouhei@ruby-lang.org>



git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8_7@29863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
commit 52b399fd4cf852d99ad55556dbc873d6cec0ee7a 1 parent 6ae1da5
@shyouhei shyouhei authored
Showing with 16 additions and 1 deletion.
  1. +5 −0 ChangeLog
  2. +10 −0 parse.y
  3. +1 −1  version.h
View
5 ChangeLog
@@ -1,3 +1,8 @@
+Sun Oct 3 18:30:23 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * parse.y (rb_intern): should check symbol table overflow.
+ #3900 [ruby-dev:42330]
+
Fri Oct 1 15:12:05 2010 NAKAMURA Usaku <usa@ruby-lang.org>
* win32/win32.c (init_stdhandle): redirect unopened IOs to NUL.
View
10 parse.y
@@ -6222,6 +6222,16 @@ rb_intern(name)
}
if (*m) id = ID_JUNK;
new_id:
+ if (last_id >= SYM2ID(~(VALUE)0) >> ID_SCOPE_SHIFT) {
+ if (last > 20) {
+ rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.20s...)",
+ name);
+ }
+ else {
+ rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.*s)",
+ last, name);
+ }
+ }
id |= ++last_id << ID_SCOPE_SHIFT;
id_regist:
name = strdup(name);
View
2  version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2010-11-22"
#define RUBY_VERSION_CODE 187
#define RUBY_RELEASE_CODE 20101122
-#define RUBY_PATCHLEVEL 312
+#define RUBY_PATCHLEVEL 313
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8
Please sign in to comment.
Something went wrong with that request. Please try again.