diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-15 09:26:15 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-15 09:26:15 +0000 |
| commit | 99664f9ec38d8ec55e0199ce54f587aebb030b96 (patch) | |
| tree | e2b67a8b71cd446e24e20160fabe034ba147259c | |
| parent | 5d30d35036f6bfd3588e0e71f59b42baff3e61ed (diff) | |
| download | ruby-99664f9ec38d8ec55e0199ce54f587aebb030b96.tar.gz ruby-99664f9ec38d8ec55e0199ce54f587aebb030b96.tar.xz ruby-99664f9ec38d8ec55e0199ce54f587aebb030b96.zip | |
* parse.y (rb_intern3): check symbol table overflow before generate
next id. [ruby-core:26092]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | parse.y | 2 |
2 files changed, 4 insertions, 4 deletions
@@ -1,7 +1,7 @@ -Thu Oct 15 16:57:38 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> +Thu Oct 15 18:26:12 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> - * parse.y (rb_intern3): check symbol table overflow. - [ruby-core:26092] + * parse.y (rb_intern3): check symbol table overflow before generate + next id. [ruby-core:26092] Thu Oct 15 15:14:15 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> @@ -9498,7 +9498,7 @@ rb_intern3(const char *name, long len, rb_encoding *enc) mbstr:; } new_id: - if (!(global_symbols.last_id << (ID_SCOPE_SHIFT+RUBY_SPECIAL_SHIFT))) { + if (global_symbols.last_id >= ~(ID)0 >> (ID_SCOPE_SHIFT+RUBY_SPECIAL_SHIFT)) { if (len > 20) { rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.20s...)", name); |
