mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
* 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:
parent
b5dde87123
commit
a1ab2bc8a4
3 changed files with 18 additions and 3 deletions
|
@ -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>
|
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
|
* lib/rdoc/ri/ri_paths.rb (RI::Paths): use RbConfig instead of
|
||||||
|
|
10
parse.y
10
parse.y
|
@ -6227,6 +6227,16 @@ rb_intern(name)
|
||||||
}
|
}
|
||||||
if (*m) id = ID_JUNK;
|
if (*m) id = ID_JUNK;
|
||||||
new_id:
|
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 |= ++last_id << ID_SCOPE_SHIFT;
|
||||||
id_regist:
|
id_regist:
|
||||||
name = strdup(name);
|
name = strdup(name);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#define RUBY_VERSION "1.8.8"
|
#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_VERSION_CODE 188
|
||||||
#define RUBY_RELEASE_CODE 20101001
|
#define RUBY_RELEASE_CODE 20101003
|
||||||
#define RUBY_PATCHLEVEL -1
|
#define RUBY_PATCHLEVEL -1
|
||||||
|
|
||||||
#define RUBY_VERSION_MAJOR 1
|
#define RUBY_VERSION_MAJOR 1
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
#define RUBY_VERSION_TEENY 8
|
#define RUBY_VERSION_TEENY 8
|
||||||
#define RUBY_RELEASE_YEAR 2010
|
#define RUBY_RELEASE_YEAR 2010
|
||||||
#define RUBY_RELEASE_MONTH 10
|
#define RUBY_RELEASE_MONTH 10
|
||||||
#define RUBY_RELEASE_DAY 1
|
#define RUBY_RELEASE_DAY 3
|
||||||
|
|
||||||
#define NO_STRING_LITERAL_CONCATENATION 1
|
#define NO_STRING_LITERAL_CONCATENATION 1
|
||||||
#ifdef RUBY_EXTERN
|
#ifdef RUBY_EXTERN
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue