* 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
This commit is contained in:
nobu 2010-10-03 09:30:30 +00:00
parent b5dde87123
commit a1ab2bc8a4
3 changed files with 18 additions and 3 deletions

View file

@ -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 16:54:19 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/rdoc/ri/ri_paths.rb (RI::Paths): use RbConfig instead of

10
parse.y
View file

@ -6227,6 +6227,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 file

@ -1,7 +1,7 @@
#define RUBY_VERSION "1.8.8"
#define RUBY_RELEASE_DATE "2010-10-01"
#define RUBY_RELEASE_DATE "2010-10-03"
#define RUBY_VERSION_CODE 188
#define RUBY_RELEASE_CODE 20101001
#define RUBY_RELEASE_CODE 20101003
#define RUBY_PATCHLEVEL -1
#define RUBY_VERSION_MAJOR 1
@ -9,7 +9,7 @@
#define RUBY_VERSION_TEENY 8
#define RUBY_RELEASE_YEAR 2010
#define RUBY_RELEASE_MONTH 10
#define RUBY_RELEASE_DAY 1
#define RUBY_RELEASE_DAY 3
#define NO_STRING_LITERAL_CONCATENATION 1
#ifdef RUBY_EXTERN