summaryrefslogtreecommitdiff
path: root/bootstraptest/test_method.rb
AgeCommit message (Collapse)Author
2024-03-17[Bug #20218] Reject keyword arguments in indexNobuyoshi Nakada
2024-03-17[Bug #19918] Reject block passing in indexNobuyoshi Nakada
2024-01-11Avoid reading unused lvars in Primitive.cexprJohn Hawthorn
Previously on builds with optimizations disabled, this could result in an out of bounds read. When we had all of: * built with -O0 * Leaf builtin * Primitive.mandatory_only * "no args builtin", called by vm_call_single_noarg_inline_builti * The stack is escaped to the heap via binding or a proc This is because mk_builtin_loader generated reads for all locals regardless of whether they were used and in the case we generated a mandatory_only iseq that would include more variables than were actually available. On optimized builds, the invalid accesses would be optimized away, and this also was often unnoticed as the invalid access would just hit another part of the stack unless it had been escaped to the heap. The fix here is imperfect, as this could have false positives, but since Primitive.cexpr! is only available within the cruby codebase itself that's probably fine as a proper fix would be much more challenging (the only false positives we found were in rjit.rb). Fixes [Bug #20178] Co-authored-by: Adam Hess <HParker@github.com>
2022-02-06support concurrent btest executionKoichi Sasada
* `-j` option for concurrent test with threads * `-jN` uses N threads * `-j` uses nproc/2 threads * Introduce `BT` struct to manage configurations * Introduce `Assertion` to manage all assertions * Remove all toplevel instance variables * Show elapsed seconds at last ``` $ time make btest ... real 0m37.319s user 0m26.221s sys 0m16.534s $ time make btest TESTOPTS=-j ... real 0m11.812s user 0m36.667s sys 0m21.872s ``` Notes: Merged: https://github.com/ruby/ruby/pull/5528
2015-10-24relax error message formatnobu
* bootstraptest/test_method.rb: relax error message format. * test/ruby/test_arity.rb (err_mess): ditto. [Feature #9025], [ruby-core:71178] [Bug #11617] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-18* bootstraptest/test_method.rb: remove a test because $SAFE=2 wasko1
obsolete. Please check btest, too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-17* include/ruby/ruby.h: $SAFE=3 is now obsolete.hsbt
* ext/socket/init.c, ext/socket/socket.c, ext/socket/tcpsocket.c ext/socket/udpsocket.c, gc.c, object.c, re.c, safe.c: removed code for $SAFE=3 * bootstraptest/test_method.rb, test/erb/test_erb.rb, test/ruby/test_dir.rb test/ruby/test_file.rb, test/ruby/test_method.rb, test/ruby/test_regexp.rb test/ruby/test_thread.rb: remove tests for $SAFE=3 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-15FreeBSD 10 SEGVs this less than 4M + 12K bytes.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-13* bootstraptest/test_autoload.rb, bootstraptest/test_method.rb:shugo
remove tests for $SAFE=4. * lib/pp.rb: use taint instead of untrust to avoid warnings when $VERBOSE is set to true. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-13* vm_insnhelper.c (vm_caller_setup_args): save and restoreko1
ci->argc and ci->blockptr before and after method invocations because these method dispatches override call_info. * bootstraptest/test_method.rb: add tests for this fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-15* vm_insnhelper.c (vm_call_method): disable CI_SET_FASTPATH() ifko1
this method call needs splat argument because cahced functions (vm_call_attrset, vm_call_ivar, vm_call_cfunc_fast_(unary|binary)) do not check an arity. * bootstraptest/test_method.rb: add a test to check an above issue. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17* compile.c (iseq_compile_each): fix return value of obj[a,*b]=c.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-15* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-21* bootstraptest/test_method.rb: fix last commit.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-21bootstraptest/test_method.rb: add a test for [ruby-core:30534].ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-05* vm_method.c (rb_unlink_method_entry, rb_sweep_method_entry):ko1
added. Unlinked method entries are collected to vm->unlinked_method_entry_list. On the GC timing, mark all method entries which are on all living threads. Only non-marked method entries are collected. This hack prevents releasing living method entry. [Performance Consideration] Since this Method Entry GC (MEGC) doesn't occuer frequently, MEGC will not be a performance bottleneck. However, to traverse living method entries, every control frame push needs to clear cfp->me field. This will be a performance issue (because pushing control frame is occurred frequently). Bug #2777 [ruby-dev:40457] * cont.c (fiber_init): init cfp->me. * gc.c (garbage_collect): kick rb_sweep_method_entry(). * method.h (rb_method_entry_t): add a mark field. * vm.c (invoke_block_from_c): set passed me. * vm.c (rb_thread_mark): mark cfp->me. * vm_core.h (rb_thread_t): add a field passed_me. * vm_core.h (rb_vm_t): add a field unlinked_method_entry_list. * vm_insnhelper.c (vm_push_frame): clear cfp->me at all times. * vm_insnhelper.c (vm_call_bmethod): pass me. * bootstraptest/test_method.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-30* compile.c (iseq_compile_each): fix stack consistency error.mame
[ruby-core:24611] * bootstraptest/test_method.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22* vm_eval.c (method_missing): should not pop cfp if missing methodnobu
is method_missing. [ruby-core:22298] * vm_eval.c (rb_raise_method_missing): new function to directly raise NoMethodError. * vm_insnhelper.c (vm_call_method): fixed the case method_missing is missing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-25* vm_insnhelper.c (vm_method_search): return rb_cObject if there is noko1
super class. [ruby-dev:37587] * bootstraptest/test_method.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-24* vm_insnhelper.c (vm_call_method): use class of method definedko1
instead of receiver's class on bmethod. fixes [ruby-core:20786] * bootstraptest/test_method.rb: add a test for above. * vm_insnhelper.c (vm_setup_method): remove unused parameter klass. * vm_insnhelper.h (CALL_METHOD): ditto. * insns.def, vm_eval.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21* parse.y (arg_concat_gen): concat target node should be NODE_ARRAY.ko1
[ruby-core:19413] * bootstraptest/test_method.rb: add tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-29* vm_insnhelper.c (vm_call_method): copy arguments to allocatedko1
memory from machine stack. [ruby-dev:36028] * KNOWNBUGS.rb, bootstraptest/test_method.rb: move fixed test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-27* bootstraptests/method.rb: increase RLIMIT_STACK size to 4M+8Kbytesnaruse
because FreeBSD fails this less than that. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-15* eval.c (rb_f_block_given_p): fix to skip class frame.ko1
[ruby-core:14813] * KNOWNBUGS.rb, bootstraptest/test_method.rb: move solved test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-13* lib/uri/generic.rb: revert r15442. 2nd argument of String#sub parsenaruse
escapes. [ruby-dev:33726] * bootstraptest/test_method.rb enc/depend instruby.rb lib/mkmf.rb mkconfig.rb: revert r15443. ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-12* bootstraptest/runner.rb, bootstraptest/test_method.rb, enc/depend,naruse
instruby.rb, lib/mkmf.rb, lib/test/unit/util/procwrapper.rb, mkconfig.rb, sample/test.rb, template/vm.inc.tmpl, test/ruby/test_stringchar.rb: fixes arround String#gsub. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-10* eval.c (rb_f_public_send): rename invoke_method to public_send.matz
it now invokes public method only no matter how it's called. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-27* eval.c (rb_method_missing): fix stack trace.ko1
* bootstraptest/test_knownbug.rb: move solved tests. * bootstraptest/test_method.rb, test/ruby/test_regexp.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-27* insns.def, compile.c: fix to allow dsym for alias/undef.ko1
[ruby-dev:32355] * bootstraptest/test_method.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-04* eval.c (rb_f_send): allow send/__send__ to call methods of allmatz
visibility again. we no longer provide __send, __send!. * eval.c (rb_invoke_method): new method to honor private visibility. if it's invoked in a function call style, it calls private methods as well (previous 1.9 send behavior). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-01* proc.c (proc_dup): proc->block.proc should be self.ko1
* bootstraptest/test_knownbug.rb, test_method.rb: move a fixed test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-01check exception on Process.setrlimit.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-01* bootstraptest/test_method.rb: use assert_normal_exit to testakr
[ruby-dev:31818]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-26* bootstraptest/test_knownbug.rb: move fixed tests.ko1
* bootstraptest/test_method.rb: ditto. * test/ruby/test_io.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25* insnhelper.ci (vm_call_method): fix to relaxant safe level checkko1
($SAFE > 2). [ruby-core:11998] * bootstraptest/test_method.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-24* eval.c (rb_f_send_bang): abandon the name funcall for privatematz
aware method call. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-18* compile.c (iseq_compile_each): fix to allow self.x=ko1
if x= is private. * bootstraptest/test_method.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-17* eval.c (rb_call), eval_method.ci (rb_add_method, rb_alias),ko1
insnhelper.ci (vm_call_method): fix to save safelevel for method node. * include/ruby/node.h: ditto. * bootstraptest/test_method.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-03* compile.c (compile_array): ignore NODE_ZARRAY.ko1
[ruby-dev:31110] * bootstraptest/test_method.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-03* compile.c (iseq_compile_each): support v[&b]= type method call.ko1
[ruby-dev:31094] * bootstraptest/test_method.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-24* insnhelper.h: change CHECK_STACK_OVERFLOW() to throw exception.ko1
* vm.c (caller_setup_arg), vm_macro.def: remove macro_eval_setup_send_arguments and add caller_setup_arg(). * insns.def: ditto. * bootstraptest/test_method.rb: add splat arg tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-24* vm.c (callee_setup_arg): added. support correct post arg.ko1
* vm_macro.def (macro_eval_invoke_func): fix to use callee_setup_arg. * compile.c (set_arguments): adjust for above changes. * compile.c (iseq_compile_each): ditto. * iseq.c (ruby_iseq_disasm): ditto. * yarvcore.h: add rb_iseq_t#post_arg_start and arg_size. * bootstraptest/test_method.rb: add post arg tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-24* bootstraptest/test_class.rb: new file.aamine
* bootstraptest/test_method.rb: add tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-24* bootstraptest: new test suite.aamine
* bootstraptest/runner.rb: new file. * bootstraptest/test_literal.rb: new file. * bootstraptest/test_method.rb: new file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e